Skip to content

Commit

Permalink
Comments review
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankElias77 committed Apr 1, 2021
1 parent c73be4d commit cdcc8a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SmartDeviceLink/private/SDLLockScreenManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ - (void)sdl_driverDistractionStateDidChange:(SDLRPCNotificationNotification *)no
if (![notification isNotificationMemberOfClass:[SDLOnDriverDistraction class]]) {
return;
}
// currentDriverDistraction variable is introduced to insure that unless the lockScreenDismissalEnabled value changes, it should stay what it was last set to
// When an `OnDriverDistraction` notification is sent with a `lockScreenDismissalEnabled` value, keep track of said value if subsequent `OnDriverDistraction`s are missing the `lockScreenDismissalEnabled` value. This is done because the `lockScreenDismissalEnabled` state is assumed to be the same value until a new `lockScreenDismissalEnabled` value is received.
SDLOnDriverDistraction *currentDriverDistraction = notification.notification;
if (currentDriverDistraction.lockScreenDismissalEnabled == nil && self.lastDriverDistractionNotification.lockScreenDismissalEnabled != nil){
currentDriverDistraction.lockScreenDismissalEnabled = self.lastDriverDistractionNotification.lockScreenDismissalEnabled;
Expand All @@ -190,7 +190,7 @@ - (void)sdl_checkLockScreen {

- (void)sdl_updatePresentation {
if (self.config.displayMode == SDLLockScreenConfigurationDisplayModeAlways) {
if (self.canPresent) {
if (self.canPresent && !self.lockScreenDismissedByUser) {
[self.presenter updateLockScreenToShow:YES withCompletionHandler:nil];
}
} else if (self.lastLockNotification.lockScreenStatus == SDLLockScreenStatusRequired) {
Expand Down

0 comments on commit cdcc8a9

Please sign in to comment.