SDL 0119 - SDL Passenger Mode#1088
Conversation
Lockscreen dismiss
Add get/set method to OnDriverDistraction for lockscreen dismissibility Notify LockScreenActivity if lockscreen is dismissible Handle swipe action for lockscreen UI
Commit the rest of the changes that were not committed.
Commit changes to OnDriverDistraction
Codecov Report
@@ Coverage Diff @@
## develop #1088 +/- ##
=============================================
+ Coverage 46.7% 46.73% +0.03%
- Complexity 3860 4024 +164
=============================================
Files 440 455 +15
Lines 21113 22228 +1115
Branches 2335 2524 +189
=============================================
+ Hits 9860 10388 +528
- Misses 10699 11228 +529
- Partials 554 612 +58
Continue to review full report at Codecov.
|
theresalech
left a comment
There was a problem hiding this comment.
@Tnnnguyen I've found a few required change, per the accepted proposal
- Actual: No message is displayed that indicates you can dismiss the lock screen.
Expected: "Dismissals should include a warning to the user and ensure that they are not the driver."
|
@theresalech What is the exact wording of the additional message that you want? Also where is the new message's location within the lock screen? |
|
@theresalech Do you have the exact wording of the additional message that you want? Also where is the new message's location within the lock screen? |
|
@Tnnnguyen there is a proposal in review to confirm this wording: smartdevicelink/sdl_evolution#769. |
|
@theresalech thanks. |
- Change dismiss motion from swipe up to swipe down - Lockscreen should not show again if user has already dismissed it for the same run - Parse lockscreen warning message from core - Add getter/setter for warning message to OnDriverDistraction
|
@Tnnnguyen the lock screen dismissal message can be at the bottom of the screen, replacing the "Locked for your safety" text. You can see the iOS implementation for reference: smartdevicelink/sdl_ios#1296. |
|
@theresalech thanks, I kind of guess, so I made that change on my last revision. |
- Utilize previous null check logic for context.get()
…ted but LockscreenManager is disposed
|
@theresalech this PR is ready for review, thanks. |
| protected boolean lockScreenEnabled, deviceLogoEnabled; | ||
| protected int lockScreenIcon, lockScreenColor, customView; | ||
| protected Bitmap deviceLogo; | ||
| private boolean mIsLockscreenDissmissible; |
| // do something with the status | ||
| if (notification != null) { | ||
| OnDriverDistraction ddState = (OnDriverDistraction) notification; | ||
| Boolean isDismissable = ddState.getLockscreenDismissibility(); |
| OnDriverDistraction ddState = (OnDriverDistraction) notification; | ||
| Boolean isDismissable = ddState.getLockscreenDismissibility(); | ||
| if (isDismissable != null) { | ||
| mIsLockscreenDissmissible = isDismissable; |
| */ | ||
| public class OnDriverDistraction extends RPCNotification { | ||
| public static final String KEY_STATE = "state"; | ||
| public static final String KEY_LOCKSCREEN_DISMISSIBLE = "lockScreenDismissalEnabled"; |
There was a problem hiding this comment.
can you fix the indentations to match?
There was a problem hiding this comment.
Done, no change, mis-alignment is from previous code.
|
|
||
| /** | ||
| * <p>Called to set dismissible state of Lockscreen</p> | ||
| * @param isDismissible the Lockscreen'S dismissibility |
There was a problem hiding this comment.
| * @param isDismissible the Lockscreen'S dismissibility | |
| * @param isDismissible the Lockscreen's dismissibility |
| * <p>Called to get the dismissible state of Lockscreen</p> | ||
| * @return true if the Lockscreen is dismissible, false otherwise | ||
| */ | ||
| public Boolean getLockscreenDismissibility() { |
There was a problem hiding this comment.
The setter and getter method naming should match for the same key
| } | ||
|
|
||
|
|
||
| @Override |
There was a problem hiding this comment.
double space and indentation
- Fix spellings, remove unwanted double space - Match getter/setter name
| public static final String LOCKSCREEN_DEVICE_LOGO_DOWNLOADED = "LOCKSCREEN_DEVICE_LOGO_DOWNLOADED"; | ||
| public static final String CLOSE_LOCK_SCREEN_ACTION = "CLOSE_LOCK_SCREEN"; | ||
| public static final String KEY_LOCKSCREEN_DISMISSED = "KEY_LOCKSCREEN_DISMISSED"; | ||
| public static final String KEY_LOCKSCREEN_DISIMISSIBLE = "KEY_LOCKSCREEN_DISIMISSIBLE"; |
* develop_mainRepo: (207 commits) Update travis file Update changelog for 4.9.1 Update VERSION_NAME to 4.9.1 Fix vr optional issue remove unused import Add getBytesAvailable() to FileManagerTest Add getBytesAvailable() to FileManager Add templateTitle to TextFieldNameTests Add templateTitle to TextFieldName enum Fix formatting issue Add unit tests for setting buttonId logic Fix borken SoftButton tests Calc maxButtonIdsSetByDev manually turn default oem icon setting to true Extract ids setting logic into a spearate method Update setButtonId() javadoc Remove additional semicolon BaseSoftButtonManager Roll softbutton ids over to 0 when max is reached Improve setting softbutton ids logic fix broken test ...
Fixes # SDL-0119
Revised to accommodate changes from Revise SDL-0119 SDL Passenger Mode
This PR is [ready] for review.
Risk
This PR makes [no] API changes.
Testing Plan
Test with the new Boolean bit from OnDriverDistraction, if it's true, the lockscreen can be dismissed.
Summary
The lockscreen can be swiped to dismiss if dismissible
CLA