Skip to content

Commit a7c391d

Browse files
author
Julian Kast
committed
Fix deleting voiceCommand logic
1 parent 6a6a45e commit a7c391d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,14 @@ public void setVoiceCommands(List<VoiceCommand> voiceCommands) {
145145

146146
List<VoiceCommand> validatedVoiceCommands = removeEmptyVoiceCommands(this.voiceCommands);
147147

148-
if (validatedVoiceCommands.size() == 0) {
148+
if (validatedVoiceCommands.size() == 0 && voiceCommands.size() > 0) {
149149
DebugTool.logError(TAG, "New voice commands are invalid, skipping...");
150150
return;
151151
}
152152

153153
if (!isVoiceCommandsUnique(validatedVoiceCommands)) {
154154
DebugTool.logError(TAG, "Not all voice command strings are unique across all voice commands. Voice commands will not be set.");
155155
return;
156-
157156
}
158157

159158
updateIdsOnVoiceCommands(this.voiceCommands);

0 commit comments

Comments
 (0)