-
Notifications
You must be signed in to change notification settings - Fork 131
Fix for voice command that contains no string should be removed #1686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ceCommands and avoid sending empty strings in the update operation
Codecov Report
@@ Coverage Diff @@
## develop #1686 +/- ##
=============================================
- Coverage 53.95% 53.83% -0.13%
- Complexity 5311 5447 +136
=============================================
Files 555 555
Lines 24572 25136 +564
Branches 3104 3263 +159
=============================================
+ Hits 13259 13531 +272
- Misses 10161 10426 +265
- Partials 1152 1179 +27
|
bilal-alsharifi
suggested changes
May 19, 2021
base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java
Show resolved
Hide resolved
base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java
Show resolved
Hide resolved
base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java
Outdated
Show resolved
Hide resolved
bilal-alsharifi
approved these changes
May 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1675
This PR is [ready] for review.
Risk
This PR makes [minor] API changes.
Testing Plan
Unit Tests
Unit tests were added to VoiceCommandManagerTests.java
Core Tests
Test sending voice commands with extra white space on the front and back for example: " command one ", verify that extra white space is removed and the uploaded voice command is: "command one"
Test sending two voice commands one with an empty string set like " " and one normal one, verify that only the normal voice command is sent to the update operation.
Test sending voice commands only with empty strings, like " ". Verify that an error message is printed out in the logs: "New voice commands are invalid, skipping..."
Core version / branch / commit hash / module tested against: Core 7.1.1
HMI name / version / branch / commit hash / module tested against: Sdl_HMI 5.5.1
Summary
Stripped extra white space from voice commands.
Removes empty strings from being sent in voice commands.
Changelog
Enhancements
CLA