summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatbir Tanda <satbirtanda@gmail.com>2019-07-10 16:31:11 -0700
committerSatbir Tanda <satbirtanda@gmail.com>2019-07-10 16:31:11 -0700
commit2c3a92fd0d55879708698aba8766df516f492e4d (patch)
tree96318a9f118cb5d155c777e765115c726b31aeeb
parentd681a3cceedad4eb593e9a044d2678e86a99cbbc (diff)
downloadsdl_ios-2c3a92fd0d55879708698aba8766df516f492e4d.tar.gz
Update SDLLockScreenManager.m
Update for revision to proposal
-rw-r--r--SmartDeviceLink/SDLLockScreenManager.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/SmartDeviceLink/SDLLockScreenManager.m b/SmartDeviceLink/SDLLockScreenManager.m
index 02301ccba..9876bed6b 100644
--- a/SmartDeviceLink/SDLLockScreenManager.m
+++ b/SmartDeviceLink/SDLLockScreenManager.m
@@ -142,12 +142,13 @@ NS_ASSUME_NONNULL_BEGIN
}
// Present the VC depending on the lock screen status
+ BOOL lockScreenDismissableEnabled = [self.lastDriverDistractionNotification.lockScreenDismissalEnabled boolValue];
if ([self.lastLockNotification.lockScreenStatus isEqualToEnum:SDLLockScreenStatusRequired]) {
- if (!self.presenter.presented && self.canPresent) {
+ if (!self.presenter.presented && self.canPresent && !lockScreenDismissableEnabled) {
[self.presenter present];
}
} else if ([self.lastLockNotification.lockScreenStatus isEqualToEnum:SDLLockScreenStatusOptional]) {
- if (self.config.showInOptionalState && !self.presenter.presented && self.canPresent) {
+ if (self.config.showInOptionalState && !self.presenter.presented && self.canPresent && !lockScreenDismissableEnabled) {
[self.presenter present];
} else if (!self.config.showInOptionalState && self.presenter.presented) {
[self.presenter dismiss];
@@ -160,7 +161,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)sdl_toggleLockscreenDismissalableState {
- BOOL lastLockScreenDismissableEnabled = self.lastDriverDistractionNotification.lockScreenDismissalEnabled;
+ BOOL lastLockScreenDismissableEnabled = [self.lastDriverDistractionNotification.lockScreenDismissalEnabled boolValue];
if (self.lastDriverDistractionNotification == nil || self.lastDriverDistractionNotification.lockScreenDismissalEnabled == nil ||
![self.lastDriverDistractionNotification.lockScreenDismissalEnabled boolValue]) {
self.lockScreenDismissableEnabled = NO;