Skip to content

Commit 3699318

Browse files
authored
Merge pull request #1354 from smartdevicelink/bugfix/issue_1341
Ensure MenuCell does not send an empty voice command list
2 parents 53e8f02 + aaf2dc0 commit 3699318

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,11 @@ private AddCommand commandForMenuCell(MenuCell cell, boolean shouldHaveArtwork,
962962

963963
AddCommand command = new AddCommand(cell.getCellId());
964964
command.setMenuParams(params);
965-
command.setVrCommands(cell.getVoiceCommands());
965+
if (cell.getVoiceCommands() != null && !cell.getVoiceCommands().isEmpty()) {
966+
command.setVrCommands(cell.getVoiceCommands());
967+
} else {
968+
command.setVrCommands(null);
969+
}
966970
command.setCmdIcon((cell.getIcon() != null && shouldHaveArtwork) ? cell.getIcon().getImageRPC() : null);
967971

968972
return command;

0 commit comments

Comments
 (0)