summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2020-03-31 09:42:52 -0400
committerGitHub <noreply@github.com>2020-03-31 09:42:52 -0400
commit2bf024ab23b9aa3f3d434f0359ce27adc0113f1c (patch)
tree89a93cfb7bd395c53fd87bc364dbf27c07cec12a
parent3a3a89d59593ebbc7dabf7e9f24a3079de5b8359 (diff)
parent1a665fbdb6ca5b97ccbea389d78f2c8356a20294 (diff)
downloadsdl_ios-2bf024ab23b9aa3f3d434f0359ce27adc0113f1c.tar.gz
Merge pull request #1608 from smartdevicelink/bugfix/issue_1601_deprecate_lockscreen_notifications
Deprecated lockscreen notification and enum
-rw-r--r--SmartDeviceLink/SDLLockScreenManager.m12
-rw-r--r--SmartDeviceLink/SDLLockScreenStatus.h8
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.h2
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.m24
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h2
-rw-r--r--SmartDeviceLink/SDLNotificationDispatcher.m6
-rw-r--r--SmartDeviceLink/SDLProxyListener.h2
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenManagerSpec.m28
-rw-r--r--SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m39
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLockScreenStatusSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnLockScreenStatusSpec.m13
11 files changed, 115 insertions, 24 deletions
diff --git a/SmartDeviceLink/SDLLockScreenManager.m b/SmartDeviceLink/SDLLockScreenManager.m
index f8bbee25f..e1b02b8cd 100644
--- a/SmartDeviceLink/SDLLockScreenManager.m
+++ b/SmartDeviceLink/SDLLockScreenManager.m
@@ -54,7 +54,10 @@ NS_ASSUME_NONNULL_BEGIN
_presenter = presenter;
_lockScreenDismissedByUser = NO;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_lockScreenStatusDidChange:) name:SDLDidChangeLockScreenStatusNotification object:dispatcher];
+#pragma clang diagnostic pop
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_lockScreenIconReceived:) name:SDLDidReceiveLockScreenIcon object:dispatcher];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_appDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_driverDistractionStateDidChange:) name:SDLDidChangeDriverDistractionStateNotification object:dispatcher];
@@ -194,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
}
}
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index 01e04e2de..06be369af 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -560,7 +560,7 @@ extern SDLNotificationName const SDLDidReceiveKeyboardInputNotification;
extern SDLNotificationName const SDLDidChangeLanguageNotification;
/// Name for a LockScreenStatus notification RPC
-extern SDLNotificationName const SDLDidChangeLockScreenStatusNotification;
+extern SDLNotificationName const SDLDidChangeLockScreenStatusNotification __deprecated;
/// Name for a NewHash notification RPC
extern SDLNotificationName const SDLDidReceiveNewHashNotification;
diff --git a/SmartDeviceLink/SDLNotificationDispatcher.m b/SmartDeviceLink/SDLNotificationDispatcher.m
index bf00e5547..b1997c8a8 100644
--- a/SmartDeviceLink/SDLNotificationDispatcher.m
+++ b/SmartDeviceLink/SDLNotificationDispatcher.m
@@ -673,9 +673,15 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCNotificationNotification:SDLDidChangeLanguageNotification notification:notification];
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)onOnLockScreenNotification:(SDLOnLockScreenStatus *)notification {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[self postRPCNotificationNotification:SDLDidChangeLockScreenStatusNotification notification:notification];
+#pragma clang diagnostic pop
}
+#pragma clang diagnostic pop
- (void)onOnPermissionsChange:(SDLOnPermissionsChange *)notification {
[self postRPCNotificationNotification:SDLDidChangePermissionsNotification notification:notification];
diff --git a/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink/SDLProxyListener.h
index dd9520f20..3513e2202 100644
--- a/SmartDeviceLink/SDLProxyListener.h
+++ b/SmartDeviceLink/SDLProxyListener.h
@@ -1178,7 +1178,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-- (void)onOnLockScreenNotification:(SDLOnLockScreenStatus *)notification;
+- (void)onOnLockScreenNotification:(SDLOnLockScreenStatus *)notification __deprecated;
#pragma clang diagnostic pop
/**
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenManagerSpec.m
index 30949168a..c45340c75 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenManagerSpec.m
@@ -66,17 +66,12 @@ describe(@"a lock screen manager", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
__block SDLOnLockScreenStatus *testRequiredStatus = nil;
-#pragma clang diagnostic pop
beforeEach(^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequiredStatus = [[SDLOnLockScreenStatus alloc] init];
-#pragma clang diagnostic pop
-
testRequiredStatus.lockScreenStatus = SDLLockScreenStatusRequired;
-
[testNotificationDispatcher postNotificationName:SDLDidChangeLockScreenStatusNotification infoObject:testRequiredStatus];
+#pragma clang diagnostic pop
});
it(@"should not have presented the lock screen", ^{
@@ -118,10 +113,9 @@ describe(@"a lock screen manager", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequiredStatus = [[SDLOnLockScreenStatus alloc] init];
-#pragma clang diagnostic pop
testRequiredStatus.lockScreenStatus = SDLLockScreenStatusRequired;
-
SDLRPCNotificationNotification *testLockStatusNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeLockScreenStatusNotification object:nil rpcNotification:testRequiredStatus];
+#pragma clang diagnostic pop
[[NSNotificationCenter defaultCenter] postNotification:testLockStatusNotification];
});
@@ -213,16 +207,12 @@ describe(@"a lock screen manager", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
__block SDLOnLockScreenStatus *testOffStatus = nil;
-#pragma clang diagnostic pop
-
+
beforeEach(^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testOffStatus = [[SDLOnLockScreenStatus alloc] init];
-#pragma clang diagnostic pop
testOffStatus.lockScreenStatus = SDLLockScreenStatusOff;
-
SDLRPCNotificationNotification *testLockStatusNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeLockScreenStatusNotification object:nil rpcNotification:testOffStatus];
+#pragma clang diagnostic pop
[[NSNotificationCenter defaultCenter] postNotification:testLockStatusNotification];
});
@@ -332,8 +322,8 @@ describe(@"a lock screen manager", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLOnLockScreenStatus *status = [[SDLOnLockScreenStatus alloc] init];
-#pragma clang diagnostic pop
status.lockScreenStatus = SDLLockScreenStatusRequired;
+#pragma clang diagnostic pop
testManager.lastLockNotification = status;
SDLOnDriverDistraction *testDriverDistraction = [[SDLOnDriverDistraction alloc] init];
@@ -376,8 +366,11 @@ describe(@"a lock screen manager", ^{
context(@"receiving a lock screen status of required", ^{
beforeEach(^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testStatus.lockScreenStatus = SDLLockScreenStatusRequired;
testLockStatusNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeLockScreenStatusNotification object:nil rpcNotification:testStatus];
+#pragma clang diagnostic pop
[[NSNotificationCenter defaultCenter] postNotification:testLockStatusNotification];
});
@@ -389,8 +382,11 @@ describe(@"a lock screen manager", ^{
context(@"receiving a lock screen status of off", ^{
beforeEach(^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testStatus.lockScreenStatus = SDLLockScreenStatusOff;
testLockStatusNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeLockScreenStatusNotification object:nil rpcNotification:testStatus];
+#pragma clang diagnostic pop
[[NSNotificationCenter defaultCenter] postNotification:testLockStatusNotification];
});
@@ -412,9 +408,9 @@ describe(@"a lock screen manager", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLOnLockScreenStatus *testOptionalStatus = [[SDLOnLockScreenStatus alloc] init];
-#pragma clang diagnostic pop
testOptionalStatus.lockScreenStatus = SDLLockScreenStatusOptional;
testLockStatusNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeLockScreenStatusNotification object:nil rpcNotification:testOptionalStatus];
+#pragma clang diagnostic pop
testLockScreenConfig = [SDLLockScreenConfiguration enabledConfiguration];
});
diff --git a/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m b/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m
index acf64f0b8..d877d3d39 100644
--- a/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m
+++ b/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m
@@ -99,7 +99,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen off", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusOff));
+#pragma clang diagnostic pop
});
});
@@ -109,7 +112,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen off", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusOff));
+#pragma clang diagnostic pop
});
});
@@ -125,7 +131,10 @@ describe(@"the lockscreen status manager", ^{
context(@"if we do not set the driver distraction state", ^{
it(@"should return lock screen required", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
});
});
@@ -135,7 +144,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen optional", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusOptional));
+#pragma clang diagnostic pop
});
});
@@ -145,7 +157,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen required", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
});
});
});
@@ -156,7 +171,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen off", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusOff));
+#pragma clang diagnostic pop
});
});
});
@@ -168,7 +186,10 @@ describe(@"the lockscreen status manager", ^{
context(@"if we do not set the driver distraction state", ^{
it(@"should return lock screen required", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
});
});
@@ -178,7 +199,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen optional", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusOptional));
+#pragma clang diagnostic pop
});
});
@@ -188,7 +212,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen required", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
});
});
});
@@ -200,7 +227,10 @@ describe(@"the lockscreen status manager", ^{
context(@"if we do not set the driver distraction state", ^{
it(@"should return lock screen required", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
});
});
@@ -210,7 +240,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen optional", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusOptional));
+#pragma clang diagnostic pop
});
});
@@ -220,7 +253,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should return lock screen required", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(lockScreenManager.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
});
});
});
@@ -253,7 +289,10 @@ describe(@"the lockscreen status manager", ^{
});
it(@"should properly return lock screen status", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(onLockScreenStatusNotification.lockScreenStatus).to(equal(SDLLockScreenStatusOptional));
+#pragma clang diagnostic pop
});
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLockScreenStatusSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLockScreenStatusSpec.m
index 0761cbed3..d6aaf4036 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLockScreenStatusSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLockScreenStatusSpec.m
@@ -14,9 +14,12 @@ QuickSpecBegin(SDLLockScreenStatusSpec)
describe(@"Individual Enum Value Tests", ^ {
it(@"Should match internal values", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(SDLLockScreenStatusOff).to(equal(@"OFF"));
expect(SDLLockScreenStatusOptional).to(equal(@"OPTIONAL"));
expect(SDLLockScreenStatusRequired).to(equal(@"REQUIRED"));
+#pragma clang diagnostic pop
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnLockScreenStatusSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnLockScreenStatusSpec.m
index 4f4a574ee..da9c091df 100644
--- a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnLockScreenStatusSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnLockScreenStatusSpec.m
@@ -22,15 +22,20 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLOnLockScreenStatus* testNotification = [[SDLOnLockScreenStatus alloc] init];
#pragma clang diagnostic pop
-
testNotification.driverDistractionStatus = @NO;
testNotification.userSelected = @3;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testNotification.lockScreenStatus = SDLLockScreenStatusRequired;
+#pragma clang diagnostic pop
testNotification.hmiLevel = SDLHMILevelNone;
expect(testNotification.driverDistractionStatus).to(equal(@NO));
expect(testNotification.userSelected).to(equal(@3));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testNotification.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
expect(testNotification.hmiLevel).to(equal(SDLHMILevelNone));
});
@@ -39,7 +44,10 @@ describe(@"Getter/Setter Tests", ^ {
@{SDLRPCParameterNameParameters:
@{@"driverDistractionStatus":@NO,
@"userSelected":@3,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@"OnLockScreenStatus":SDLLockScreenStatusRequired,
+#pragma clang diagnostic pop
@"hmiLevel":SDLHMILevelNone},
SDLRPCParameterNameOperationName:@"OnLockScreenStatus"}} mutableCopy];
#pragma clang diagnostic push
@@ -49,7 +57,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testNotification.driverDistractionStatus).to(equal(@NO));
expect(testNotification.userSelected).to(equal(@3));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testNotification.lockScreenStatus).to(equal(SDLLockScreenStatusRequired));
+#pragma clang diagnostic pop
expect(testNotification.hmiLevel).to(equal(SDLHMILevelNone));
});