diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java index 0cf2549cbe..ec07e5305e 100644 --- a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java +++ b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java @@ -217,21 +217,27 @@ List removeEmptyVoiceCommands(List voiceCommands) { List validatedVoiceCommands = new ArrayList<>(); for (VoiceCommand voiceCommand : voiceCommands) { if (voiceCommand == null) { + DebugTool.logWarning(TAG, "Voice command is null, it will not be uploaded"); continue; } List voiceCommandStrings = new ArrayList<>(); for (String voiceCommandString : voiceCommand.getVoiceCommands()) { if (voiceCommandString == null) { + DebugTool.logWarning(TAG, "Removing null string from voice command"); continue; } String trimmedString = voiceCommandString.trim(); if (trimmedString.length() > 0) { voiceCommandStrings.add(trimmedString); + } else { + DebugTool.logWarning(TAG, "Empty string removed from voice command"); } } if (voiceCommandStrings.size() > 0) { voiceCommand.setVoiceCommands(voiceCommandStrings); validatedVoiceCommands.add(voiceCommand); + } else { + DebugTool.logWarning(TAG, "Voice command will not be uploaded as it contained no valid strings"); } } return validatedVoiceCommands;