Add multiple checks to supportsSoftButtonImages() #1801
Merged
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 #1800
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Unit Tests
N/A
Core Tests
On Core, I ran the following code in
testBlank()
of a local clone of sdl_test_suite_java and a modified local copy of sdl_java_suite in whichPresentAlertOperation.supportSoftButtonImages()
is public.Test Code
Core version / branch / commit hash / module tested against: Core release/8.1.0 b30f01258aeea4ec4c9cde22e942f091ade1cbfb
HMI name / version / branch / commit hash / module tested against: Generic HMI release/0.12.0 3ec306d2521f5151c215e4d98d9a230d6c544d6e
Summary
This PR adds null checks and a
List.size()
check toPresentAlertOperation.supportsSoftButtonImages()
. These checks prevent crashes and returns true when soft button capabilities are unavailable. This new behavior improves alignment with the other SDL libraries.Changelog
Breaking Changes
Enhancements
Bug Fixes
CLA