diff options
author | NicoleYarroch <nicole@livio.io> | 2020-03-31 07:46:11 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2020-03-31 07:46:11 -0400 |
commit | 9c50f96fe700cae4df75c2a0be3c6a38e5864ccc (patch) | |
tree | 049d79eefe0fae2c82939449402f3f182efac014 | |
parent | 53ddc76775ec4fe9c67c7802008e5f15b59595d6 (diff) | |
download | sdl_ios-9c50f96fe700cae4df75c2a0be3c6a38e5864ccc.tar.gz |
Deprecated SDLLockScreenStatus
-rw-r--r-- | SmartDeviceLink/SDLLockScreenManager.m | 9 | ||||
-rw-r--r-- | SmartDeviceLink/SDLLockScreenStatus.h | 8 | ||||
-rw-r--r-- | SmartDeviceLink/SDLLockScreenStatusManager.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLLockScreenStatusManager.m | 24 |
4 files changed, 38 insertions, 5 deletions
diff --git a/SmartDeviceLink/SDLLockScreenManager.m b/SmartDeviceLink/SDLLockScreenManager.m index f963c9088..e1b02b8cd 100644 --- a/SmartDeviceLink/SDLLockScreenManager.m +++ b/SmartDeviceLink/SDLLockScreenManager.m @@ -197,17 +197,26 @@ NS_ASSUME_NONNULL_BEGIN if (self.canPresent) { [self.presenter updateLockScreenToShow:YES withCompletionHandler:nil]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" } else if ([self.lastLockNotification.lockScreenStatus isEqualToEnum:SDLLockScreenStatusRequired]) { +#pragma clang diagnostic pop if (self.canPresent && !self.lockScreenDismissedByUser) { [self.presenter updateLockScreenToShow:YES withCompletionHandler:nil]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" } else if ([self.lastLockNotification.lockScreenStatus isEqualToEnum:SDLLockScreenStatusOptional]) { +#pragma clang diagnostic pop if (self.config.displayMode == SDLLockScreenConfigurationDisplayModeOptionalOrRequired && self.canPresent && !self.lockScreenDismissedByUser) { [self.presenter updateLockScreenToShow:YES withCompletionHandler:nil]; } else if (self.config.displayMode != SDLLockScreenConfigurationDisplayModeOptionalOrRequired) { [self.presenter updateLockScreenToShow:NO withCompletionHandler:nil]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" } else if ([self.lastLockNotification.lockScreenStatus isEqualToEnum:SDLLockScreenStatusOff]) { +#pragma clang diagnostic pop [self.presenter updateLockScreenToShow:NO withCompletionHandler:nil]; } } diff --git a/SmartDeviceLink/SDLLockScreenStatus.h b/SmartDeviceLink/SDLLockScreenStatus.h index 62f48ba05..d5d4846b9 100644 --- a/SmartDeviceLink/SDLLockScreenStatus.h +++ b/SmartDeviceLink/SDLLockScreenStatus.h @@ -11,19 +11,19 @@ Used in OnLockScreenStatus */ -typedef SDLEnum SDLLockScreenStatus SDL_SWIFT_ENUM; +typedef SDLEnum SDLLockScreenStatus SDL_SWIFT_ENUM __deprecated; /** * LockScreen is Not Required */ -extern SDLLockScreenStatus const SDLLockScreenStatusOff; +extern SDLLockScreenStatus const SDLLockScreenStatusOff __deprecated; /** * LockScreen is Optional */ -extern SDLLockScreenStatus const SDLLockScreenStatusOptional; +extern SDLLockScreenStatus const SDLLockScreenStatusOptional __deprecated; /** * LockScreen is Required */ -extern SDLLockScreenStatus const SDLLockScreenStatusRequired; +extern SDLLockScreenStatus const SDLLockScreenStatusRequired __deprecated; diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.h b/SmartDeviceLink/SDLLockScreenStatusManager.h index 90b3d85a3..a6ac19b01 100644 --- a/SmartDeviceLink/SDLLockScreenStatusManager.h +++ b/SmartDeviceLink/SDLLockScreenStatusManager.h @@ -17,9 +17,9 @@ NS_ASSUME_NONNULL_BEGIN @property (assign, nonatomic) BOOL userSelected; @property (assign, nonatomic) BOOL driverDistracted; @property (nullable, strong, nonatomic) SDLHMILevel hmiLevel; -@property (strong, nonatomic, readonly) SDLLockScreenStatus lockScreenStatus; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +@property (strong, nonatomic, readonly) SDLLockScreenStatus lockScreenStatus; @property (strong, nonatomic, readonly) SDLOnLockScreenStatus *lockScreenStatusNotification; #pragma clang diagnostic pop diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.m b/SmartDeviceLink/SDLLockScreenStatusManager.m index 4ab22faa4..3c240edf9 100644 --- a/SmartDeviceLink/SDLLockScreenStatusManager.m +++ b/SmartDeviceLink/SDLLockScreenStatusManager.m @@ -68,36 +68,60 @@ NS_ASSUME_NONNULL_BEGIN return notification; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (SDLLockScreenStatus)lockScreenStatus { +#pragma clang diagnostic pop if (self.hmiLevel == nil || [self.hmiLevel isEqualToEnum:SDLHMILevelNone]) { // App is not active on the car +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusOff; +#pragma clang diagnostic pop } else if ([self.hmiLevel isEqualToEnum:SDLHMILevelBackground]) { // App is in the background on the car if (self.userSelected) { // It was user selected if (self.haveDriverDistractionStatus && !self.driverDistracted) { // We have the distraction status, and the driver is not distracted +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusOptional; +#pragma clang diagnostic pop } else { // We don't have the distraction status, and/or the driver is distracted +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusRequired; +#pragma clang diagnostic pop } } else { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusOff; +#pragma clang diagnostic pop } } else if ([self.hmiLevel isEqualToEnum:SDLHMILevelFull] || [self.hmiLevel isEqualToEnum:SDLHMILevelLimited]) { // App is in the foreground on the car in some manner if (self.haveDriverDistractionStatus && !self.driverDistracted) { // We have the distraction status, and the driver is not distracted +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusOptional; +#pragma clang diagnostic pop } else { // We don't have the distraction status, and/or the driver is distracted +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusRequired; +#pragma clang diagnostic pop } } else { // This shouldn't be possible. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return SDLLockScreenStatusOff; +#pragma clang diagnostic pop } } |