Skip to content

Commit 9173b0a

Browse files
authored
Merge pull request #505 from smartdevicelink/bugfix/submenu-voice-commands
Log warning when trying to send a SubMenu cell with voice commands
2 parents 0ea3941 + 60be7ac commit 9173b0a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/js/src/manager/screen/menu/_MenuReplaceUtilities.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ class _MenuReplaceUtilities {
342342
const shouldCellIncludeSecondaryImage = cell.getSecondaryArtwork() !== null && cell.getSecondaryArtwork().getImageRPC() !== null && _MenuReplaceUtilities.shouldCellIncludeSecondaryImageFromCell(cell, fileManager, windowCapability);
343343
const secondaryIcon = shouldCellIncludeSecondaryImage ? cell.getSecondaryArtwork().getImageRPC() : null;
344344

345+
if (Array.isArray(cell.getVoiceCommands()) && cell.getVoiceCommands().length > 0) {
346+
console.warn('MenuManagerBase - Setting voice commands for submenu cells is not supported. The voice commands will not be set.');
347+
}
348+
345349
let submenuLayout = null;
346350
const availableMenuLayouts = windowCapability !== null ? windowCapability.getMenuLayoutsAvailable() : null;
347351
if (cell.getSubMenuLayout() !== null && availableMenuLayouts !== null && availableMenuLayouts.includes(cell.getSubMenuLayout())) {

0 commit comments

Comments
 (0)