summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2017-02-22 08:41:31 +0100
committerMuller, Alexander (A.) <amulle19@ford.com>2017-02-22 08:41:31 +0100
commit6a16f7986743d34cf5e56262690390fe33a82d53 (patch)
tree9955c44d5d9ce4946bbda232e9792be92e310af4
parent0043a4bf7a5fcefdafa0dd0f7973933c5bb2cca9 (diff)
parenta284bdfc1e92ef7e5048fb8d5b1364885bd6ee01 (diff)
downloadsdl_ios-hotfix/issue_529.tar.gz
Merge remote-tracking branch 'origin/master' into hotfix/issue_529hotfix/issue_529
* origin/master: Fixes #539 Xcode 8.3 beta 2 fixes
-rw-r--r--SmartDeviceLink/SDLConsoleController.m2
-rw-r--r--SmartDeviceLink/SDLFileManager.m2
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.m11
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.m2
-rw-r--r--SmartDeviceLink/SDLPermissionManager.m4
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.m2
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.m2
-rw-r--r--SmartDeviceLink/SDLVrCapabilities.m2
-rw-r--r--SmartDeviceLink/SDLVrHelpItem.m2
-rw-r--r--SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m28
10 files changed, 43 insertions, 14 deletions
diff --git a/SmartDeviceLink/SDLConsoleController.m b/SmartDeviceLink/SDLConsoleController.m
index ade1c17df..fcbcd78a7 100644
--- a/SmartDeviceLink/SDLConsoleController.m
+++ b/SmartDeviceLink/SDLConsoleController.m
@@ -3,7 +3,7 @@
#import "SDLConsoleController.h"
-#import "SDLJSONEncoder.h"
+#import "SDLJsonEncoder.h"
#import "SDLRPCResponse.h"
diff --git a/SmartDeviceLink/SDLFileManager.m b/SmartDeviceLink/SDLFileManager.m
index 86507224b..0321691ac 100644
--- a/SmartDeviceLink/SDLFileManager.m
+++ b/SmartDeviceLink/SDLFileManager.m
@@ -40,7 +40,7 @@ SDLFileManagerState *const SDLFileManagerStateStartupError = @"StartupError";
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
// Remote state
-@property (copy, nonatomic, readwrite) NSMutableSet<SDLFileName *> *mutableRemoteFileNames;
+@property (strong, nonatomic, readwrite) NSMutableSet<SDLFileName *> *mutableRemoteFileNames;
@property (assign, nonatomic, readwrite) NSUInteger bytesAvailable;
// Local state
diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.m b/SmartDeviceLink/SDLLockScreenStatusManager.m
index 86350b0d0..956da2dcf 100644
--- a/SmartDeviceLink/SDLLockScreenStatusManager.m
+++ b/SmartDeviceLink/SDLLockScreenStatusManager.m
@@ -71,10 +71,17 @@
return [SDLLockScreenStatus OFF];
} else if ([self.hmiLevel isEqualToEnum:[SDLHMILevel BACKGROUND]]) {
// App is in the background on the car
- // The lockscreen depends entirely on if the user selected the app
if (self.userSelected) {
- return [SDLLockScreenStatus REQUIRED];
+ // It was user selected
+ if (self.haveDriverDistractionStatus && !self.driverDistracted) {
+ // We have the distraction status, and the driver is not distracted
+ return [SDLLockScreenStatus OPTIONAL];
+ } else {
+ // We don't have the distraction status, and/or the driver is distracted
+ return [SDLLockScreenStatus REQUIRED];
+ }
} else {
+ // It wasn't user selected
return [SDLLockScreenStatus OFF];
}
} else if ([self.hmiLevel isEqualToEnum:[SDLHMILevel FULL]] || [self.hmiLevel isEqualToEnum:[SDLHMILevel LIMITED]]) {
diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m
index 9496aa7a2..f769e835e 100644
--- a/SmartDeviceLink/SDLPerformInteraction.m
+++ b/SmartDeviceLink/SDLPerformInteraction.m
@@ -9,7 +9,7 @@
#import "SDLNames.h"
#import "SDLTTSChunk.h"
#import "SDLTTSChunkFactory.h"
-#import "SDLVRHelpItem.h"
+#import "SDLVrHelpItem.h"
static UInt16 const SDLDefaultTimeout = 10000;
diff --git a/SmartDeviceLink/SDLPermissionManager.m b/SmartDeviceLink/SDLPermissionManager.m
index a6898ee55..af8df0ce9 100644
--- a/SmartDeviceLink/SDLPermissionManager.m
+++ b/SmartDeviceLink/SDLPermissionManager.m
@@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLPermissionManager ()
-@property (copy, nonatomic) NSMutableDictionary<SDLPermissionRPCName, SDLPermissionItem *> *permissions;
-@property (copy, nonatomic) NSMutableArray<SDLPermissionFilter *> *filters;
+@property (strong, nonatomic) NSMutableDictionary<SDLPermissionRPCName, SDLPermissionItem *> *permissions;
+@property (strong, nonatomic) NSMutableArray<SDLPermissionFilter *> *filters;
@property (copy, nonatomic, nullable) SDLHMILevel *currentHMILevel;
@end
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
index 18356c34f..0dcab3498 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
@@ -16,7 +16,7 @@
#import "SDLSoftButtonCapabilities.h"
#import "SDLSpeechCapabilities.h"
#import "SDLSyncMsgVersion.h"
-#import "SDLVRCapabilities.h"
+#import "SDLVrCapabilities.h"
#import "SDLVehicleType.h"
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink/SDLSetGlobalProperties.m
index 490c1fc34..9c7a500e5 100644
--- a/SmartDeviceLink/SDLSetGlobalProperties.m
+++ b/SmartDeviceLink/SDLSetGlobalProperties.m
@@ -9,7 +9,7 @@
#import "SDLNames.h"
#import "SDLTTSChunk.h"
#import "SDLTTSChunkFactory.h"
-#import "SDLVRHelpItem.h"
+#import "SDLVrHelpItem.h"
@implementation SDLSetGlobalProperties
diff --git a/SmartDeviceLink/SDLVrCapabilities.m b/SmartDeviceLink/SDLVrCapabilities.m
index 72c8c39d2..985d33726 100644
--- a/SmartDeviceLink/SDLVrCapabilities.m
+++ b/SmartDeviceLink/SDLVrCapabilities.m
@@ -2,7 +2,7 @@
//
-#import "SDLVRCapabilities.h"
+#import "SDLVrCapabilities.h"
SDLVRCapabilities *SDLVRCapabilities_TEXT = nil;
diff --git a/SmartDeviceLink/SDLVrHelpItem.m b/SmartDeviceLink/SDLVrHelpItem.m
index 97dc86df4..b24bc9504 100644
--- a/SmartDeviceLink/SDLVrHelpItem.m
+++ b/SmartDeviceLink/SDLVrHelpItem.m
@@ -2,7 +2,7 @@
//
-#import "SDLVRHelpItem.h"
+#import "SDLVrHelpItem.h"
#import "SDLImage.h"
#import "SDLNames.h"
diff --git a/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m b/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m
index 546380367..8a61980fe 100644
--- a/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m
+++ b/SmartDeviceLinkTests/ProxySpecs/SDLLockScreenStatusManagerSpec.m
@@ -122,9 +122,31 @@ describe(@"the lockscreen status manager", ^{
beforeEach(^{
lockScreenManager.userSelected = YES;
});
-
- it(@"should return lock screen required", ^{
- expect(lockScreenManager.lockScreenStatus).to(equal([SDLLockScreenStatus REQUIRED]));
+
+ context(@"if we do not set the driver distraction state", ^{
+ it(@"should return lock screen required", ^{
+ expect(lockScreenManager.lockScreenStatus).to(equal([SDLLockScreenStatus REQUIRED]));
+ });
+ });
+
+ context(@"if we set the driver distraction state to false", ^{
+ beforeEach(^{
+ lockScreenManager.driverDistracted = NO;
+ });
+
+ it(@"should return lock screen optional", ^{
+ expect(lockScreenManager.lockScreenStatus).to(equal([SDLLockScreenStatus OPTIONAL]));
+ });
+ });
+
+ context(@"if we set the driver distraction state to true", ^{
+ beforeEach(^{
+ lockScreenManager.driverDistracted = YES;
+ });
+
+ it(@"should return lock screen required", ^{
+ expect(lockScreenManager.lockScreenStatus).to(equal([SDLLockScreenStatus REQUIRED]));
+ });
});
});