File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
base/src/main/java/com/smartdevicelink/managers/screen/menu Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -217,21 +217,27 @@ List<VoiceCommand> removeEmptyVoiceCommands(List<VoiceCommand> voiceCommands) {
217217 List <VoiceCommand > validatedVoiceCommands = new ArrayList <>();
218218 for (VoiceCommand voiceCommand : voiceCommands ) {
219219 if (voiceCommand == null ) {
220+ DebugTool .logWarning (TAG , "Voice command is null, it will not be uploaded" );
220221 continue ;
221222 }
222223 List <String > voiceCommandStrings = new ArrayList <>();
223224 for (String voiceCommandString : voiceCommand .getVoiceCommands ()) {
224225 if (voiceCommandString == null ) {
226+ DebugTool .logWarning (TAG , "Removing null string from voice command" );
225227 continue ;
226228 }
227229 String trimmedString = voiceCommandString .trim ();
228230 if (trimmedString .length () > 0 ) {
229231 voiceCommandStrings .add (trimmedString );
232+ } else {
233+ DebugTool .logWarning (TAG , "Empty string removed from voice command" );
230234 }
231235 }
232236 if (voiceCommandStrings .size () > 0 ) {
233237 voiceCommand .setVoiceCommands (voiceCommandStrings );
234238 validatedVoiceCommands .add (voiceCommand );
239+ } else {
240+ DebugTool .logWarning (TAG , "Voice command will not be uploaded as it contained no valid strings" );
235241 }
236242 }
237243 return validatedVoiceCommands ;
You can’t perform that action at this time.
0 commit comments