summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatbir Tanda <satbirtanda@gmail.com>2019-07-30 16:22:20 -0700
committerSatbir Tanda <satbirtanda@gmail.com>2019-07-30 16:22:20 -0700
commit39dd2726e8d9429c8062330a5dc78a9df7ebadb1 (patch)
treedaa9f38cca6a10ec652db0ed7a4d77f97d200ae2
parent7ebc8591ce375efd78a1ff3a1a2fff6de69932f2 (diff)
downloadsdl_ios-39dd2726e8d9429c8062330a5dc78a9df7ebadb1.tar.gz
Update SDLLockScreenManager.m
Fix for proposal
-rw-r--r--SmartDeviceLink/SDLLockScreenManager.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLLockScreenManager.m b/SmartDeviceLink/SDLLockScreenManager.m
index 81654b074..0ffba3f7c 100644
--- a/SmartDeviceLink/SDLLockScreenManager.m
+++ b/SmartDeviceLink/SDLLockScreenManager.m
@@ -170,12 +170,19 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)sdl_updateLockScreenDismissable {
- if (self.lastDriverDistractionNotification == nil || self.lastDriverDistractionNotification.lockScreenDismissalEnabled == nil ||
+ if (self.lastDriverDistractionNotification == nil ||
+ self.lastDriverDistractionNotification.lockScreenDismissalEnabled == nil ||
!self.lastDriverDistractionNotification.lockScreenDismissalEnabled.boolValue) {
self.lockScreenDismissable = NO;
} else {
self.lockScreenDismissable = YES;
}
+
+ if (self.lockScreenDismissedByUser &&
+ [self.lastDriverDistractionNotification.state isEqualToEnum:SDLDriverDistractionStateOn] &&
+ !self.lockScreenDismissable) {
+ self.lockScreenDismissedByUser = NO;
+ }
if (!self.lockScreenDismissedByUser) {
[self sdl_updateLockscreenViewControllerWithDismissableState:self.lockScreenDismissable];