Skip to content

SDL 0119 - SDL Passenger Mode#1088

Merged
BrettyWhite merged 12 commits intosmartdevicelink:developfrom
Tnnnguyen:lockscreenDismiss
Jul 31, 2019
Merged

SDL 0119 - SDL Passenger Mode#1088
BrettyWhite merged 12 commits intosmartdevicelink:developfrom
Tnnnguyen:lockscreenDismiss

Conversation

@Tnnnguyen
Copy link
Copy Markdown
Contributor

@Tnnnguyen Tnnnguyen commented Jun 6, 2019

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

Tnnnguyen and others added 4 commits June 5, 2019 16:02
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-io
Copy link
Copy Markdown

codecov-io commented Jun 6, 2019

Codecov Report

Merging #1088 into develop will increase coverage by 0.03%.
The diff coverage is 4.65%.

Impacted file tree graph

@@              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
Impacted Files Coverage Δ Complexity Δ
...ink/managers/lockscreen/SDLLockScreenActivity.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...smartdevicelink/proxy/rpc/OnDriverDistraction.java 62.5% <14.28%> (-37.5%) 5 <0> (ø)
...icelink/managers/lockscreen/LockScreenManager.java 28.46% <5.26%> (-3.98%) 6 <0> (ø)
...tdevicelink/managers/screen/BaseScreenManager.java 67.71% <0%> (-7.06%) 41% <0%> (ø)
...tdevicelink/managers/audio/AudioDecoderCompat.java 70% <0%> (-3.34%) 3% <0%> (ø)
...smartdevicelink/managers/screen/menu/MenuCell.java 88.23% <0%> (-1.32%) 28% <0%> (ø)
...tdevicelink/managers/audio/AudioStreamManager.java 45.5% <0%> (-0.43%) 13% <0%> (+1%)
...om/smartdevicelink/transport/SdlRouterService.java 11.83% <0%> (-0.01%) 20% <0%> (ø)
...vicelink/proxy/rpc/ClimateControlCapabilities.java 100% <0%> (ø) 37% <0%> (+2%) ⬆️
...rtdevicelink/managers/screen/SoftButtonObject.java 61.64% <0%> (ø) 19% <0%> (ø) ⬇️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23bb686...ae6a3ae. Read the comment docs.

@theresalech theresalech changed the title Lockscreen dismiss SDL 0119 - SDL Passenger Mode Jun 11, 2019
Copy link
Copy Markdown
Contributor

@theresalech theresalech left a comment

Choose a reason for hiding this comment

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

@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."

@Tnnnguyen
Copy link
Copy Markdown
Contributor Author

@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?

@Tnnnguyen
Copy link
Copy Markdown
Contributor Author

@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?

@theresalech
Copy link
Copy Markdown
Contributor

@Tnnnguyen there is a proposal in review to confirm this wording: smartdevicelink/sdl_evolution#769.

@Tnnnguyen
Copy link
Copy Markdown
Contributor Author

@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
@theresalech
Copy link
Copy Markdown
Contributor

@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.

@Tnnnguyen
Copy link
Copy Markdown
Contributor Author

@theresalech thanks, I kind of guess, so I made that change on my last revision.

- Utilize previous null check logic for context.get()
@Tnnnguyen
Copy link
Copy Markdown
Contributor Author

@theresalech this PR is ready for review, thanks.

protected boolean lockScreenEnabled, deviceLogoEnabled;
protected int lockScreenIcon, lockScreenColor, customView;
protected Bitmap deviceLogo;
private boolean mIsLockscreenDissmissible;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spelling

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

// do something with the status
if (notification != null) {
OnDriverDistraction ddState = (OnDriverDistraction) notification;
Boolean isDismissable = ddState.getLockscreenDismissibility();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spelling

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

OnDriverDistraction ddState = (OnDriverDistraction) notification;
Boolean isDismissable = ddState.getLockscreenDismissibility();
if (isDismissable != null) {
mIsLockscreenDissmissible = isDismissable;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spelling

*/
public class OnDriverDistraction extends RPCNotification {
public static final String KEY_STATE = "state";
public static final String KEY_LOCKSCREEN_DISMISSIBLE = "lockScreenDismissalEnabled";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you fix the indentations to match?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, no change, mis-alignment is from previous code.


/**
* <p>Called to set dismissible state of Lockscreen</p>
* @param isDismissible the Lockscreen'S dismissibility
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param isDismissible the Lockscreen'S dismissibility
* @param isDismissible the Lockscreen's dismissibility

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

* <p>Called to get the dismissible state of Lockscreen</p>
* @return true if the Lockscreen is dismissible, false otherwise
*/
public Boolean getLockscreenDismissibility() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The setter and getter method naming should match for the same key

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

}


@Override
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

double space and indentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

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";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spelling

* 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
  ...
@BrettyWhite BrettyWhite merged commit 4e429a8 into smartdevicelink:develop Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants