diff options
author | Frank Elias <francois.elias@livio.io> | 2021-03-19 15:08:23 -0400 |
---|---|---|
committer | Frank Elias <francois.elias@livio.io> | 2021-03-19 15:08:23 -0400 |
commit | 9c1b7a509a061f7e0ff9f55b788c1a69f26e251b (patch) | |
tree | 6e457ae7ea392b6e0c3853cb6f403b0de182c33c | |
parent | f590b0941cb92b646b066c912d8a8da9efd6ed59 (diff) | |
download | sdl_ios-9c1b7a509a061f7e0ff9f55b788c1a69f26e251b.tar.gz |
quick fix
-rw-r--r-- | SmartDeviceLink/private/SDLLockScreenManager.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/SmartDeviceLink/private/SDLLockScreenManager.m b/SmartDeviceLink/private/SDLLockScreenManager.m index b5d0cddde..1924b8b5a 100644 --- a/SmartDeviceLink/private/SDLLockScreenManager.m +++ b/SmartDeviceLink/private/SDLLockScreenManager.m @@ -165,8 +165,13 @@ NS_ASSUME_NONNULL_BEGIN if (![notification isNotificationMemberOfClass:[SDLOnDriverDistraction class]]) { return; } - - self.lastDriverDistractionNotification = notification.notification; + // currentDriverDistraction variable is introduced to insure that unless the lockScreenDismissalEnabled value changes, it should stay what it was last set to + SDLOnDriverDistraction *currentDriverDistraction = notification.notification; + if (currentDriver.lockScreenDismissalEnabled == nil && self.lastDriverDistractionNotification.lockScreenDismissalEnabled != nil){ + currentDriverDistraction.lockScreenDismissalEnabled = self.lastDriverDistractionNotification.lockScreenDismissalEnabled; + currentDriverDistraction.lockScreenDismissalWarning = self.lastDriverDistractionNotification.lockScreenDismissalWarning; + } + self.lastDriverDistractionNotification = currentDriverDistraction; [self sdl_updateLockScreenDismissable]; } |