summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2019-10-04 08:58:39 -0400
committerNicoleYarroch <nicole@livio.io>2019-10-04 08:58:39 -0400
commitad10b9485477b7973998837aff3cbc296aa07fb9 (patch)
treef0346e0707363b2fb9208aeb59adc3f371fcc341
parenteb29dc3188373b008a49366134189087cbb538fd (diff)
parent11e7c4b783675b1f46c8c064b36eb7161de41a1a (diff)
downloadsdl_ios-ad10b9485477b7973998837aff3cbc296aa07fb9.tar.gz
Merge branch 'develop' into feature/issue_1007_pixel_density_and_scale
-rw-r--r--.travis.yml10
-rw-r--r--SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard11
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.h4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetSystemCapabilityResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetSystemCapabilityResponse.m4
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.h18
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.m16
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h2
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m2
-rw-r--r--SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLStreamingMediaConfiguration.h8
-rw-r--r--SmartDeviceLink/SDLStreamingMediaConfiguration.m2
-rw-r--r--SmartDeviceLink/SDLStreamingVideoLifecycleManager.h6
-rw-r--r--SmartDeviceLink/SDLStreamingVideoLifecycleManager.m22
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m4
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m38
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m1
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.pngbin0 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.pngbin0 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.pngbin0 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.pngbin0 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.pngbin0 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m2
29 files changed, 103 insertions, 79 deletions
diff --git a/.travis.yml b/.travis.yml
index 7c09c4f82..7ea31d992 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,8 @@
language: objective-c
-osx_image: xcode10.3
+osx_image: xcode11
xcode_project: SmartDeviceLink-iOS.xcodeproj
xcode_scheme: SmartDeviceLink
-xcode_sdk: iphonesimulator12.4
+xcode_sdk: iphonesimulator13.0
env:
global:
- FRAMEWORK_NAME=SmartDeviceLink
@@ -18,9 +18,9 @@ before_script:
- carthage bootstrap --platform ios
script:
-- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator12.4" -destination "OS=12.4,name=iPhone Xs" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
-- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-ObjC" -sdk "iphonesimulator12.4" -destination "OS=12.4,name=iPhone Xs" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
-- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-Swift" -sdk "iphonesimulator12.4" -destination "OS=12.4,name=iPhone Xs" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator13.0" -destination "OS=13.0,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-ObjC" -sdk "iphonesimulator13.0" -destination "OS=13.0,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-Swift" -sdk "iphonesimulator13.0" -destination "OS=13.0,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
after_script:
- bash <(curl -s https://codecov.io/bash)
diff --git a/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard b/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard
index 6d65f20d9..611806ac1 100644
--- a/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard
+++ b/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="sao-xX-Ugl">
- <device id="retina4_7" orientation="portrait">
- <adaptation id="fullscreen"/>
- </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="sao-xX-Ugl">
+ <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
- <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Lock Screen View Controller-->
<scene sceneID="390-LV-jKT">
<objects>
- <viewController id="sao-xX-Ugl" customClass="SDLLockScreenViewController" sceneMemberID="viewController">
+ <viewController modalPresentationStyle="fullScreen" id="sao-xX-Ugl" customClass="SDLLockScreenViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="mqk-8V-oes"/>
<viewControllerLayoutGuide type="bottom" id="wh4-r5-yql"/>
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
index f78dbe2dc..aca74a779 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
@@ -16,9 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
Array of bytes comprising CAN message result.
- Required
+ Optional
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
+@property (nullable, strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
@end
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
index 8863f97ec..a7b5cc254 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.m
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
@@ -20,11 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setMessageDataResult:(NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (void)setMessageDataResult:(nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
[self.parameters sdl_setObject:messageDataResult forName:SDLRPCParameterNameMessageDataResult];
}
-- (NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameMessageDataResult ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.h b/SmartDeviceLink/SDLGetDTCsResponse.h
index 3a8a5a99f..fd05f4196 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.h
+++ b/SmartDeviceLink/SDLGetDTCsResponse.h
@@ -16,8 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)
+
+ Optional
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
/**
Array of all reported DTCs on module (ecuHeader contains information if list is truncated). Each DTC is represented by 4 bytes (3 bytes of data and 1 byte status as defined in VHR_Layout_Specification_DTCs.pdf).
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.m b/SmartDeviceLink/SDLGetDTCsResponse.m
index 087990a88..3d141c96a 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.m
+++ b/SmartDeviceLink/SDLGetDTCsResponse.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setEcuHeader:(NSNumber<SDLInt> *)ecuHeader {
+- (void)setEcuHeader:(nullable NSNumber<SDLInt> *)ecuHeader {
[self.parameters sdl_setObject:ecuHeader forName:SDLRPCParameterNameECUHeader];
}
-- (NSNumber<SDLInt> *)ecuHeader {
+- (nullable NSNumber<SDLInt> *)ecuHeader {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameECUHeader ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
index 372531877..5ab234ed0 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The requested data
+
+ Optional
*/
-@property (strong, nonatomic) SDLModuleData *moduleData;
+@property (nullable, strong, nonatomic) SDLModuleData *moduleData;
/**
It is a conditional-mandatory parameter: must be returned in case "subscribe" parameter was present in the related request.
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
index d57c35ad8..c729e66ee 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
@@ -22,11 +22,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setModuleData:(SDLModuleData *)moduleData {
+- (void)setModuleData:(nullable SDLModuleData *)moduleData {
[self.parameters sdl_setObject:moduleData forName:SDLRPCParameterNameModuleData];
}
-- (SDLModuleData *)moduleData {
+- (nullable SDLModuleData *)moduleData {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleData ofClass:SDLModuleData.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetSystemCapabilityResponse.h b/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
index 2c4372651..215a4c409 100644
--- a/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
+++ b/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
@@ -22,8 +22,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The requested system capability, of the type that was sent in the request
+
+ Optional
*/
-@property (strong, nonatomic) SDLSystemCapability *systemCapability;
+@property (nullable, strong, nonatomic) SDLSystemCapability *systemCapability;
@end
diff --git a/SmartDeviceLink/SDLGetSystemCapabilityResponse.m b/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
index c3abcc757..730f74c71 100644
--- a/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
+++ b/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
@@ -30,11 +30,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setSystemCapability:(SDLSystemCapability *)systemCapability {
+- (void)setSystemCapability:(nullable SDLSystemCapability *)systemCapability {
[self.parameters sdl_setObject:systemCapability forName:SDLRPCParameterNameSystemCapability];
}
-- (SDLSystemCapability *)systemCapability {
+- (nullable SDLSystemCapability *)systemCapability {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameSystemCapability ofClass:SDLSystemCapability.class error:&error];
}
diff --git a/SmartDeviceLink/SDLHMICapabilities.h b/SmartDeviceLink/SDLHMICapabilities.h
index 96c6e6259..84a2eecf7 100644
--- a/SmartDeviceLink/SDLHMICapabilities.h
+++ b/SmartDeviceLink/SDLHMICapabilities.h
@@ -60,6 +60,24 @@ NS_ASSUME_NONNULL_BEGIN
**/
@property (nullable, copy, nonatomic) NSNumber<SDLBool> *appServices;
+/**
+ Availability of displays. True: Available, False: Not Available
+
+ Boolean value. Optional.
+
+ Since SDL 6.0
+**/
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *displays;
+
+/**
+ Availability of seatLocation. True: Available, False: Not Available
+
+ Boolean value. Optional.
+
+ Since SDL 6.0
+ **/
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *seatLocation;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMICapabilities.m b/SmartDeviceLink/SDLHMICapabilities.m
index 4955c927f..fd0104e5e 100644
--- a/SmartDeviceLink/SDLHMICapabilities.m
+++ b/SmartDeviceLink/SDLHMICapabilities.m
@@ -51,6 +51,22 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameAppServices ofClass:NSNumber.class error:nil];
}
+- (void)setDisplays:(nullable NSNumber<SDLBool> *)displays {
+ [self.store sdl_setObject:displays forName:SDLRPCParameterNameDisplays];
+}
+
+- (nullable NSNumber<SDLBool> *)displays {
+ return [self.store sdl_objectForName:SDLRPCParameterNameDisplays ofClass:NSNumber.class error:nil];
+}
+
+- (void)setSeatLocation:(nullable NSNumber<SDLBool> *)seatLocation {
+ [self.store sdl_setObject:seatLocation forName:SDLRPCParameterNameSeatLocation];
+}
+
+- (nullable NSNumber<SDLBool> *)seatLocation {
+ return [self.store sdl_objectForName:SDLRPCParameterNameSeatLocation ofClass:NSNumber.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index bdeac6887..03f919b23 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -151,6 +151,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameDialNumberEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameDIDLocation;
extern SDLRPCParameterName const SDLRPCParameterNameDIDResult;
extern SDLRPCParameterName const SDLRPCParameterNameDimension;
+extern SDLRPCParameterName const SDLRPCParameterNameDisplays;
extern SDLRPCParameterName const SDLRPCParameterNameDisplayCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameDisplayMode;
extern SDLRPCParameterName const SDLRPCParameterNameDisplayModeUnitAvailable;
@@ -543,6 +544,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameSDLVersion;
extern SDLRPCParameterName const SDLRPCParameterNameSearchAddress;
extern SDLRPCParameterName const SDLRPCParameterNameSeatControlData;
extern SDLRPCParameterName const SDLRPCParameterNameSeatControlCapabilities;
+extern SDLRPCParameterName const SDLRPCParameterNameSeatLocation;
extern SDLRPCParameterName const SDLRPCParameterNameSeatLocationCapability;
extern SDLRPCParameterName const SDLRPCParameterNameSeats;
extern SDLRPCParameterName const SDLRPCParameterNameSecondaryColor;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index c39a7305c..4bd3f6115 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -148,6 +148,7 @@ SDLRPCParameterName const SDLRPCParameterNameDialNumberEnabled = @"dialNumberEna
SDLRPCParameterName const SDLRPCParameterNameDIDLocation = @"didLocation";
SDLRPCParameterName const SDLRPCParameterNameDIDResult = @"didResult";
SDLRPCParameterName const SDLRPCParameterNameDimension = @"dimension";
+SDLRPCParameterName const SDLRPCParameterNameDisplays = @"displays";
SDLRPCParameterName const SDLRPCParameterNameDisplayCapabilities = @"displayCapabilities";
SDLRPCParameterName const SDLRPCParameterNameDisplayLayout = @"displayLayout";
SDLRPCParameterName const SDLRPCParameterNameDisplayMode = @"displayMode";
@@ -538,6 +539,7 @@ SDLRPCParameterName const SDLRPCParameterNameSDLVersion = @"sdlVersion";
SDLRPCParameterName const SDLRPCParameterNameSearchAddress = @"searchAddress";
SDLRPCParameterName const SDLRPCParameterNameSeatControlData = @"seatControlData";
SDLRPCParameterName const SDLRPCParameterNameSeatControlCapabilities = @"seatControlCapabilities";
+SDLRPCParameterName const SDLRPCParameterNameSeatLocation = @"seatLocation";
SDLRPCParameterName const SDLRPCParameterNameSeatLocationCapability = @"seatLocationCapability";
SDLRPCParameterName const SDLRPCParameterNameSeats = @"seats";
SDLRPCParameterName const SDLRPCParameterNameSecondaryGraphic = @"secondaryGraphic";
diff --git a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
index 100509051..57690e013 100644
--- a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The new module data for the requested module
+
+ Optional
*/
-@property (strong, nonatomic) SDLModuleData *moduleData;
+@property (nullable, strong, nonatomic) SDLModuleData *moduleData;
@end
diff --git a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
index 12a00779b..c99551675 100644
--- a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setModuleData:(SDLModuleData *)moduleData {
+- (void)setModuleData:(nullable SDLModuleData *)moduleData {
[self.parameters sdl_setObject:moduleData forName:SDLRPCParameterNameModuleData];
}
-- (SDLModuleData *)moduleData {
+- (nullable SDLModuleData *)moduleData {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleData ofClass:SDLModuleData.class error:&error];
}
diff --git a/SmartDeviceLink/SDLStreamingMediaConfiguration.h b/SmartDeviceLink/SDLStreamingMediaConfiguration.h
index 76ef5b3ff..3e4f91849 100644
--- a/SmartDeviceLink/SDLStreamingMediaConfiguration.h
+++ b/SmartDeviceLink/SDLStreamingMediaConfiguration.h
@@ -45,18 +45,10 @@ typedef NS_ENUM(NSUInteger, SDLCarWindowRenderingType) {
* Properties to use for applications that utilize the video encoder for streaming. See VTCompressionProperties.h for more details. For example, you can set kVTCompressionPropertyKey_ExpectedFrameRate to set your framerate. Setting the framerate this way will also set the framerate if you use CarWindow automatic streaming.
*
* Other properties you may want to try adjusting include kVTCompressionPropertyKey_AverageBitRate and kVTCompressionPropertyKey_DataRateLimits.
-
- @note Setting values can be overridden by StreamingMediaManager when `allowOverrideEncoderSettings` property is YES.
-
*/
@property (copy, nonatomic, nullable) NSDictionary<NSString *, id> *customVideoEncoderSettings;
/**
- When YES, the StreamingMediaManager will override encoder settings by the capability values returned from HMI. If you wish not to allow overriding encoder settings, set it to NO. Defaults to YES.
- */
-@property (assign, nonatomic) BOOL allowOverrideEncoderSettings;
-
-/**
Usable to change run time video stream setup behavior. Only use this and modify the results if you *really* know what you're doing. The head unit defaults are generally good.
*/
@property (weak, nonatomic, nullable) id<SDLStreamingMediaManagerDataSource> dataSource;
diff --git a/SmartDeviceLink/SDLStreamingMediaConfiguration.m b/SmartDeviceLink/SDLStreamingMediaConfiguration.m
index a3a06ed6f..41c7df822 100644
--- a/SmartDeviceLink/SDLStreamingMediaConfiguration.m
+++ b/SmartDeviceLink/SDLStreamingMediaConfiguration.m
@@ -37,7 +37,6 @@ NS_ASSUME_NONNULL_BEGIN
_carWindowRenderingType = SDLCarWindowRenderingTypeLayer;
_enableForcedFramerateSync = YES;
_allowMultipleViewControllerOrientations = NO;
- _allowOverrideEncoderSettings = YES;
return self;
}
@@ -69,7 +68,6 @@ NS_ASSUME_NONNULL_BEGIN
newConfig.carWindowRenderingType = self.carWindowRenderingType;
newConfig.enableForcedFramerateSync = self.enableForcedFramerateSync;
newConfig.allowMultipleViewControllerOrientations = self.allowMultipleViewControllerOrientations;
- newConfig.allowOverrideEncoderSettings = self.allowOverrideEncoderSettings;
return newConfig;
}
diff --git a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.h b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.h
index 843d50140..3caef2b07 100644
--- a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.h
+++ b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.h
@@ -142,12 +142,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (assign, nonatomic) BOOL showVideoBackgroundDisplay;
-/**
- When YES, the StreamingMediaManager will override encoder settings by the capability values returned from HMI. Defaults to YES.
- */
-@property (assign, nonatomic) BOOL allowOverrideEncoderSettings;
-
-
- (instancetype)init NS_UNAVAILABLE;
/**
diff --git a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m
index 0b31f5140..dfd69be06 100644
--- a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m
+++ b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m
@@ -67,7 +67,8 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
@property (strong, nonatomic, readwrite, nullable) SDLVideoStreamingFormat *videoFormat;
@property (strong, nonatomic, nullable) SDLH264VideoEncoder *videoEncoder;
-@property (copy, nonatomic) NSDictionary<NSString *, id> *videoEncoderSettings;
+@property (strong, nonatomic) NSMutableDictionary *videoEncoderSettings;
+@property (copy, nonatomic) NSDictionary<NSString *, id> *customEncoderSettings;
@property (copy, nonatomic) NSArray<NSString *> *secureMakes;
@property (copy, nonatomic) NSString *connectedVehicleMake;
@@ -105,7 +106,9 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
_appName = configuration.lifecycleConfig.appName;
_connectionManager = connectionManager;
- _videoEncoderSettings = configuration.streamingMediaConfig.customVideoEncoderSettings ?: SDLH264VideoEncoder.defaultVideoEncoderSettings;
+ _videoEncoderSettings = [NSMutableDictionary dictionary];
+ [_videoEncoderSettings addEntriesFromDictionary: SDLH264VideoEncoder.defaultVideoEncoderSettings];
+ _customEncoderSettings = configuration.streamingMediaConfig.customVideoEncoderSettings;
if (configuration.streamingMediaConfig.rootViewController != nil) {
NSAssert(configuration.streamingMediaConfig.enableForcedFramerateSync, @"When using CarWindow (rootViewController != nil), forceFrameRateSync must be YES");
@@ -127,7 +130,6 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
_videoScaleManager = [SDLStreamingVideoScaleManager defaultConfiguration];
_backgroundingPixelBuffer = NULL;
_showVideoBackgroundDisplay = YES;
- _allowOverrideEncoderSettings = configuration.streamingMediaConfig.allowOverrideEncoderSettings;
_preferredFormatIndex = 0;
_preferredResolutionIndex = 0;
@@ -348,13 +350,8 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
// If we got a response, get the head unit's preferred formats and resolutions
weakSelf.preferredFormats = capability.supportedFormats;
weakSelf.preferredResolutions = @[capability.preferredResolution];
-
- if (weakSelf.allowOverrideEncoderSettings && capability.maxBitrate != nil) {
- NSNumber *bitrate = [[NSNumber alloc] initWithUnsignedLongLong:(capability.maxBitrate.unsignedLongLongValue * 1000)];
- NSMutableDictionary *settings = [[NSMutableDictionary alloc] init];
- [settings addEntriesFromDictionary: self.videoEncoderSettings];
- [settings setObject:bitrate forKey:(__bridge NSString *)kVTCompressionPropertyKey_AverageBitRate];
- weakSelf.videoEncoderSettings = settings;
+ if (capability.maxBitrate != nil) {
+ weakSelf.videoEncoderSettings[(__bridge NSString *) kVTCompressionPropertyKey_AverageBitRate] = [[NSNumber alloc] initWithUnsignedLongLong:(capability.maxBitrate.unsignedLongLongValue * 1000)];
}
if (weakSelf.dataSource != nil) {
@@ -381,6 +378,11 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
SDLLogD(@"Using generic video capabilites, preferred formats: %@, resolutions: %@, haptics disabled", weakSelf.preferredFormats, weakSelf.preferredResolutions);
}
+ // Apply customEncoderSettings here. Note that value from HMI (such as maxBitrate) will be overwritten by custom settings.
+ for (id key in self.customEncoderSettings.keyEnumerator) {
+ self.videoEncoderSettings[key] = [self.customEncoderSettings valueForKey:key];
+ }
+
if (weakSelf.dataSource != nil) {
SDLLogV(@"Calling data source for modified preferred resolutions");
weakSelf.preferredResolutions = [weakSelf.dataSource resolutionFromHeadUnitPreferredResolution:weakSelf.preferredResolutions.firstObject];
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m
index 6b677a0b5..13940def3 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m
@@ -157,7 +157,7 @@ describe(@"menu manager", ^{
testSetDisplayLayoutResponse.success = @YES;
testSetDisplayLayoutResponse.displayCapabilities = testDisplayCapabilities;
- SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveSetDisplayLayoutRequest object:self rpcResponse:testSetDisplayLayoutResponse];
+ SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveSetDisplayLayoutResponse object:nil rpcResponse:testSetDisplayLayoutResponse];
[[NSNotificationCenter defaultCenter] postNotification:notification];
expect(testManager.displayCapabilities).withTimeout(3).toEventually(equal(testDisplayCapabilities));
@@ -173,7 +173,7 @@ describe(@"menu manager", ^{
testRegisterAppInterfaceResponse.displayCapabilities = testDisplayCapabilities;
#pragma clang diagnostic pop
- SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveSetDisplayLayoutResponse object:self rpcResponse:testRegisterAppInterfaceResponse];
+ SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveSetDisplayLayoutResponse object:nil rpcResponse:testRegisterAppInterfaceResponse];
[[NSNotificationCenter defaultCenter] postNotification:notification];
expect(testManager.displayCapabilities).to(equal(testDisplayCapabilities));
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m
index 69db25e39..08424949d 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m
@@ -379,14 +379,14 @@ describe(@"present keyboard operation", ^{
response.success = @YES;
[testConnectionManager respondToLastRequestWithResponse:response];
- expect(testOp.isExecuting).to(beFalse());
- expect(testOp.isFinished).to(beTrue());
- expect(testOp.isCancelled).to(beFalse());
-
[testOp dismissKeyboard];
});
it(@"should not attempt to send a cancel interaction", ^{
+ expect(testOp.isExecuting).to(beFalse());
+ expect(testOp.isFinished).to(beTrue());
+ expect(testOp.isCancelled).to(beFalse());
+
SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
});
@@ -397,10 +397,6 @@ describe(@"present keyboard operation", ^{
[testOp start];
[testOp cancel];
- expect(testOp.isExecuting).to(beTrue());
- expect(testOp.isFinished).to(beFalse());
- expect(testOp.isCancelled).to(beTrue());
-
[testOp dismissKeyboard];
});
@@ -408,23 +404,23 @@ describe(@"present keyboard operation", ^{
SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
- expect(hasCalledOperationCompletionHandler).toEventually(beFalse());
- expect(testOp.isExecuting).toEventually(beTrue());
- expect(testOp.isFinished).toEventually(beFalse());
- expect(testOp.isCancelled).toEventually(beTrue());
+ expect(hasCalledOperationCompletionHandler).to(beFalse());
+ expect(testOp.isExecuting).to(beTrue());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beTrue());
});
});
context(@"If the operation has not started", ^{
beforeEach(^{
- expect(testOp.isExecuting).to(beFalse());
- expect(testOp.isFinished).to(beFalse());
- expect(testOp.isCancelled).to(beFalse());
-
[testOp dismissKeyboard];
});
it(@"should not attempt to send a cancel interaction", ^{
+ expect(testOp.isExecuting).to(beFalse());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beTrue());
+
SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
expect(lastRequest).to(beNil());
});
@@ -434,16 +430,14 @@ describe(@"present keyboard operation", ^{
[testOp start];
});
- it(@"should not attempt to send a cancel interaction", ^{
- SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
- expect(lastRequest).to(beNil());
- });
-
- it(@"should finish", ^{
+ it(@"should not attempt to send a cancel interaction but should finish", ^{
expect(hasCalledOperationCompletionHandler).toEventually(beTrue());
expect(testOp.isExecuting).toEventually(beFalse());
expect(testOp.isFinished).toEventually(beTrue());
expect(testOp.isCancelled).toEventually(beTrue());
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).to(beNil());
});
});
});
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
index 499238615..a1d3596e0 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
@@ -97,7 +97,6 @@ describe(@"the streaming video manager", ^{
expect(@(streamingLifecycleManager.pixelBufferPool == NULL)).to(equal(@YES));
expect(@(streamingLifecycleManager.requestedEncryptionType)).to(equal(@(SDLStreamingEncryptionFlagNone)));
expect(@(streamingLifecycleManager.showVideoBackgroundDisplay)).to(equal(@YES));
- expect(@(streamingLifecycleManager.allowOverrideEncoderSettings)).to(equal(@YES));
expect(streamingLifecycleManager.currentAppState).to(equal(SDLAppStateActive));
expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateStopped));
expect(streamingLifecycleManager.videoFormat).to(beNil());
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png
new file mode 100644
index 000000000..fc9b8bff1
--- /dev/null
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png
new file mode 100644
index 000000000..fc9b8bff1
--- /dev/null
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png
new file mode 100644
index 000000000..fc9b8bff1
--- /dev/null
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png
new file mode 100644
index 000000000..fc9b8bff1
--- /dev/null
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png
new file mode 100644
index 000000000..fc9b8bff1
--- /dev/null
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m b/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m
index ad847378e..952efd471 100644
--- a/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m
+++ b/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m
@@ -80,8 +80,10 @@ describe(@"sending responses and notifications", ^{
it(@"should not send the rpc", ^{
testOperation = [[SDLAsynchronousRPCOperation alloc] initWithConnectionManager:testConnectionManager rpc:sendRPC];
+ [testOperationQueue setSuspended:YES];
[testOperationQueue addOperation:testOperation];
[testOperationQueue cancelAllOperations];
+ [testOperationQueue setSuspended:NO];
[NSThread sleepForTimeInterval:0.5];