Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,27 @@ List<VoiceCommand> removeEmptyVoiceCommands(List<VoiceCommand> voiceCommands) {
List<VoiceCommand> validatedVoiceCommands = new ArrayList<>();
for (VoiceCommand voiceCommand : voiceCommands) {
if (voiceCommand == null) {
DebugTool.logWarning(TAG, "Null voice command removed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DebugTool.logWarning(TAG, "Null voice command removed");
DebugTool.logWarning(TAG, "Voice command is null, it will not be uploaded");

continue;
}
List<String> voiceCommandStrings = new ArrayList<>();
for (String voiceCommandString : voiceCommand.getVoiceCommands()) {
if (voiceCommandString == null) {
DebugTool.logWarning(TAG, "Null voice command string removed");
Copy link
Contributor

@JulianKast JulianKast Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DebugTool.logWarning(TAG, "Null voice command string removed");
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 voice command string removed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DebugTool.logWarning(TAG, "Empty voice command string removed");
DebugTool.logWarning(TAG, "Empty string removed from voice command");

}
}
if (voiceCommandStrings.size() > 0) {
voiceCommand.setVoiceCommands(voiceCommandStrings);
validatedVoiceCommands.add(voiceCommand);
} else {
DebugTool.logWarning(TAG, "Empty voice command removed");
Copy link
Contributor

@JulianKast JulianKast Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DebugTool.logWarning(TAG, "Empty voice command removed");
DebugTool.logWarning(TAG, "Voice command will not be uploaded as it contained no valid strings");

}
}
return validatedVoiceCommands;
Expand Down