Skip to content
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

The lock screen configuration's `showInOptionalState` does not work as expected #1070

Closed
NicoleYarroch opened this issue Sep 4, 2018 · 6 comments

Comments

@NicoleYarroch
Copy link
Contributor

commented Sep 4, 2018

The lock screen configuration's showInOptionalState does not keep the lock screen visible when set to true.

Bug Report

If the lock screen configuration was init'd with the enabled configuration and then the showInOptionalState is set to true, the lock screen should be present, even when the car is stationary. Instead the lock screen behaves the same as the enabled configuration.

Line 140 in the sdl_checkLockScreen function of the SDLLockScreenManager might need to be changed to

} else if (self.presenter.presented && !self.config.showInOptionalState) {
Reproduction Steps
  1. Set app's lock screen configuration to enabled and then set showInOptionalState to true.
  2. Connect the app to a head unit while the head unit is "stationary"
Expected Behavior

The lock screen should show and not be dismissed.

Observed Behavior

The lock screen is shown, but immediately dismissed.

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: 6.0.2
  • Testing Against: SDL_iOS example app and TDK

@NicoleYarroch NicoleYarroch added the bug label Sep 4, 2018

@NicoleYarroch NicoleYarroch added this to the 6.1.0 milestone Sep 4, 2018

@joeljfischer

This comment has been minimized.

Copy link
Member

commented Sep 5, 2018

If the lock screen configuration was init'd with the enabled configuration and then the showInOptionalState is set to true, the lock screen should be present, even when the car is stationary.

This is not necessarily true. The optional state only occurs in very specific circumstances.

  1. The app is in the BACKGROUND HMI state.
  2. The user has interacted with the app on the head unit in the past (it was in the FULL or LIMITED HMI state more recently than it was in NONE).
  3. We have a driver distraction status (older head units wouldn't send it right after connection).
  4. The driver is not distracted.

OR

  1. The app is in the FULL / LIMITED HMI state.
  2. We have a driver distraction status (older head units wouldn't send it right after connection).
  3. The driver is not distracted.

In those cases, if the showInOptionalState is true, then the lock screen should be shown. Otherwise, it will not be shown.

@NicoleYarroch

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2018

@joeljfischer If the lockScreenStatus is SDLLockScreenStatusOptional and the developer has set showInOptionalState to true then the lock screen should still be visible even if a DD_OFF notification is received right? That is the only time showInOptionalState is used in the code.

The only documentation is very vague about what an optional state is:

/**
 *  Whether or not the lock screen should be shown in the "lock screen optional" state. Defaults to 'NO'.
 */
@property (assign, nonatomic) BOOL showInOptionalState;
@joeljfischer

This comment has been minimized.

Copy link
Member

commented Sep 5, 2018

@NicoleYarroch Yes, but not if HMI state is NONE. The user has to have interacted with the app on the head unit.

@NicoleYarroch

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2018

@joeljfischer When you say

The optional state only occurs in very specific circumstances

Are you talking about situations when an SDLLockScreenStatusOptional notification is sent by Core?

@joeljfischer

This comment has been minimized.

Copy link
Member

commented Sep 11, 2018

That notification is not sent by core, it is managed and sent by the SDLLockScreenStatusManager.

It's weird and probably not okay, I know.

@NicoleYarroch

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2018

@joeljfischer That explains things.

@NicoleYarroch NicoleYarroch self-assigned this Sep 11, 2018

@joeljfischer joeljfischer referenced this issue Sep 14, 2018
3 of 3 tasks complete

@joeljfischer joeljfischer added this to Done in v6.1.0 Sep 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.