summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-10-17 16:16:54 -0400
committerGitHub <noreply@github.com>2017-10-17 16:16:54 -0400
commit33b596fec70b3f1152cc84cf9aeafbfeca0b046e (patch)
tree847093900a5fa92f5fcfcb3b81559bb54935e870
parentfbf3506b5ab2d99683c53d3d13d5b8a1ddbfe833 (diff)
parente301fac59fb0ccd37c493942462c55cc9e3f32f5 (diff)
downloadsdl_ios-33b596fec70b3f1152cc84cf9aeafbfeca0b046e.tar.gz
Merge pull request #767 from smartdevicelink/bugfix/issue_766_haptic_manager_naming
Fix haptic manager naming
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj40
-rw-r--r--SmartDeviceLink/SDLFocusableItemHitTester.h (renamed from SmartDeviceLink/SDLHapticHitTester.h)2
-rw-r--r--SmartDeviceLink/SDLFocusableItemLocator.h (renamed from SmartDeviceLink/SDLHapticManager.h)6
-rw-r--r--SmartDeviceLink/SDLFocusableItemLocator.m (renamed from SmartDeviceLink/SDLHapticManager.m)6
-rw-r--r--SmartDeviceLink/SDLFocusableItemLocatorType.h (renamed from SmartDeviceLink/SDLHapticInterface.h)2
-rw-r--r--SmartDeviceLink/SDLStreamingMediaLifecycleManager.h4
-rw-r--r--SmartDeviceLink/SDLStreamingMediaLifecycleManager.m14
-rw-r--r--SmartDeviceLink/SDLStreamingMediaManager.h4
-rw-r--r--SmartDeviceLink/SDLStreamingMediaManager.m4
-rw-r--r--SmartDeviceLink/SDLTouchManager.m6
-rw-r--r--SmartDeviceLinkTests/ProxySpecs/SDLHapticManagerSpec.m28
-rw-r--r--SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m8
-rw-r--r--SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m2
13 files changed, 67 insertions, 59 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index b8a6bf6e9..088571848 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -292,10 +292,10 @@
1EE8C45D1F387D1C00FDC2CF /* SDLGetInteriorVehicleDataResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EE8C45C1F387D1C00FDC2CF /* SDLGetInteriorVehicleDataResponseSpec.m */; };
1EE8C45F1F3884FF00FDC2CF /* SDLSetInteriorVehicleDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EE8C45E1F3884FF00FDC2CF /* SDLSetInteriorVehicleDataSpec.m */; };
1EE8C4611F38865B00FDC2CF /* SDLSetInteriorVehicleDataResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EE8C4601F38865B00FDC2CF /* SDLSetInteriorVehicleDataResponseSpec.m */; };
- 1FF7DAB61F75B27300B46C30 /* SDLHapticInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB51F75B27300B46C30 /* SDLHapticInterface.h */; };
- 1FF7DAB81F75B28E00B46C30 /* SDLHapticHitTester.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB71F75B28E00B46C30 /* SDLHapticHitTester.h */; };
- 1FF7DABA1F75B2A800B46C30 /* SDLHapticManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB91F75B2A800B46C30 /* SDLHapticManager.h */; };
- 1FF7DABC1F75B2BF00B46C30 /* SDLHapticManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABB1F75B2BF00B46C30 /* SDLHapticManager.m */; };
+ 1FF7DAB61F75B27300B46C30 /* SDLFocusableItemLocatorType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB51F75B27300B46C30 /* SDLFocusableItemLocatorType.h */; };
+ 1FF7DAB81F75B28E00B46C30 /* SDLFocusableItemHitTester.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB71F75B28E00B46C30 /* SDLFocusableItemHitTester.h */; };
+ 1FF7DABA1F75B2A800B46C30 /* SDLFocusableItemLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */; };
+ 1FF7DABC1F75B2BF00B46C30 /* SDLFocusableItemLocator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */; };
1FF7DAC01F75CF6C00B46C30 /* SDLHapticManagerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABF1F75CF6C00B46C30 /* SDLHapticManagerSpec.m */; };
332A914F1CED9CC60043824C /* SDLAppInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 332A913D1CED87F80043824C /* SDLAppInfo.m */; };
332A91501CED9CF10043824C /* SDLAppInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 332A913C1CED87F80043824C /* SDLAppInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1479,10 +1479,10 @@
1EE8C45C1F387D1C00FDC2CF /* SDLGetInteriorVehicleDataResponseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataResponseSpec.m; sourceTree = "<group>"; };
1EE8C45E1F3884FF00FDC2CF /* SDLSetInteriorVehicleDataSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSetInteriorVehicleDataSpec.m; sourceTree = "<group>"; };
1EE8C4601F38865B00FDC2CF /* SDLSetInteriorVehicleDataResponseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSetInteriorVehicleDataResponseSpec.m; sourceTree = "<group>"; };
- 1FF7DAB51F75B27300B46C30 /* SDLHapticInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLHapticInterface.h; sourceTree = "<group>"; };
- 1FF7DAB71F75B28E00B46C30 /* SDLHapticHitTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLHapticHitTester.h; sourceTree = "<group>"; };
- 1FF7DAB91F75B2A800B46C30 /* SDLHapticManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLHapticManager.h; sourceTree = "<group>"; };
- 1FF7DABB1F75B2BF00B46C30 /* SDLHapticManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLHapticManager.m; sourceTree = "<group>"; };
+ 1FF7DAB51F75B27300B46C30 /* SDLFocusableItemLocatorType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFocusableItemLocatorType.h; sourceTree = "<group>"; };
+ 1FF7DAB71F75B28E00B46C30 /* SDLFocusableItemHitTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFocusableItemHitTester.h; sourceTree = "<group>"; };
+ 1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFocusableItemLocator.h; sourceTree = "<group>"; };
+ 1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLFocusableItemLocator.m; sourceTree = "<group>"; };
1FF7DABF1F75CF6C00B46C30 /* SDLHapticManagerSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLHapticManagerSpec.m; path = ProxySpecs/SDLHapticManagerSpec.m; sourceTree = "<group>"; };
332A913C1CED87F80043824C /* SDLAppInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLAppInfo.h; sourceTree = "<group>"; };
332A913D1CED87F80043824C /* SDLAppInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppInfo.m; sourceTree = "<group>"; };
@@ -3011,8 +3011,6 @@
5D61FB641A84238B00846EE7 /* SDLProxy.m */,
5D61FB651A84238B00846EE7 /* SDLProxyFactory.h */,
5D61FB661A84238B00846EE7 /* SDLProxyFactory.m */,
- 1FF7DAB91F75B2A800B46C30 /* SDLHapticManager.h */,
- 1FF7DABB1F75B2BF00B46C30 /* SDLHapticManager.m */,
);
name = Proxy;
sourceTree = "<group>";
@@ -3693,8 +3691,6 @@
isa = PBXGroup;
children = (
5D61FB671A84238B00846EE7 /* SDLProxyListener.h */,
- 1FF7DAB71F75B28E00B46C30 /* SDLHapticHitTester.h */,
- 1FF7DAB51F75B27300B46C30 /* SDLHapticInterface.h */,
);
name = "@protocols";
sourceTree = "<group>";
@@ -4133,6 +4129,17 @@
name = "Control Frame Payloads";
sourceTree = "<group>";
};
+ 5DA5918E1F96820F003264C3 /* Focus / Haptic */ = {
+ isa = PBXGroup;
+ children = (
+ 1FF7DAB71F75B28E00B46C30 /* SDLFocusableItemHitTester.h */,
+ 1FF7DAB51F75B27300B46C30 /* SDLFocusableItemLocatorType.h */,
+ 1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */,
+ 1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */,
+ );
+ name = "Focus / Haptic";
+ sourceTree = "<group>";
+ };
5DAE06711BDEC68700F9B498 /* Developer API Tests */ = {
isa = PBXGroup;
children = (
@@ -4407,6 +4414,7 @@
DA8966E71E56937100413EAB /* Streaming */ = {
isa = PBXGroup;
children = (
+ 5DA5918E1F96820F003264C3 /* Focus / Haptic */,
DAC5724C1D0FE3B60004288B /* Touches */,
DA8966F01E56970C00413EAB /* Utilities */,
DAA41D521DF66B1100BC7337 /* Video Encoding */,
@@ -4534,7 +4542,7 @@
5D61FE0D1A84238C00846EE7 /* SDLVrCapabilities.h in Headers */,
5DBF06271E64A91D00A5CF03 /* SDLLogFileModule.h in Headers */,
5D61FC531A84238C00846EE7 /* SDLButtonEventMode.h in Headers */,
- 1FF7DAB61F75B27300B46C30 /* SDLHapticInterface.h in Headers */,
+ 1FF7DAB61F75B27300B46C30 /* SDLFocusableItemLocatorType.h in Headers */,
5D61FC781A84238C00846EE7 /* SDLDeleteFileResponse.h in Headers */,
5DA240001F325621009C0313 /* SDLStreamingMediaConfiguration.h in Headers */,
5D61FC5F1A84238C00846EE7 /* SDLCharacterSet.h in Headers */,
@@ -4673,7 +4681,7 @@
5DB996601F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.h in Headers */,
5DCF76F51ACDBAD300BB647B /* SDLSendLocation.h in Headers */,
5D61FC9E1A84238C00846EE7 /* SDLEncodedSyncPData.h in Headers */,
- 1FF7DABA1F75B2A800B46C30 /* SDLHapticManager.h in Headers */,
+ 1FF7DABA1F75B2A800B46C30 /* SDLFocusableItemLocator.h in Headers */,
5D61FC291A84238C00846EE7 /* SDLAbstractProtocol.h in Headers */,
5D61FDE11A84238C00846EE7 /* SDLTurn.h in Headers */,
5D61FC801A84238C00846EE7 /* SDLDeleteSubMenuResponse.h in Headers */,
@@ -4737,7 +4745,7 @@
5D61FC5D1A84238C00846EE7 /* SDLChangeRegistrationResponse.h in Headers */,
5D61FDCD1A84238C00846EE7 /* SDLTimerMode.h in Headers */,
E9C32B961AB20BA200F283AF /* SDLTimer.h in Headers */,
- 1FF7DAB81F75B28E00B46C30 /* SDLHapticHitTester.h in Headers */,
+ 1FF7DAB81F75B28E00B46C30 /* SDLFocusableItemHitTester.h in Headers */,
5D61FC3D1A84238C00846EE7 /* SDLAlertResponse.h in Headers */,
5D61FDAD1A84238C00846EE7 /* SDLSubscribeButton.h in Headers */,
5D8204261BCEA8A600D0A41B /* SDLPermissionManager.h in Headers */,
@@ -5369,7 +5377,7 @@
5D61FCA41A84238C00846EE7 /* SDLEndAudioPassThru.m in Sources */,
5D8B17541AC9E11B006A6E1C /* SDLDialNumberResponse.m in Sources */,
DA6223BE1E7B088200878689 /* CVPixelBufferRef+SDLUtil.m in Sources */,
- 1FF7DABC1F75B2BF00B46C30 /* SDLHapticManager.m in Sources */,
+ 1FF7DABC1F75B2BF00B46C30 /* SDLFocusableItemLocator.m in Sources */,
EED5CA021F4D18EC00F04000 /* SDLRAWH264Packetizer.m in Sources */,
5D61FC851A84238C00846EE7 /* SDLDeviceLevelStatus.m in Sources */,
5D9FDA981F2A7D3F00A495C8 /* emhashmap.c in Sources */,
diff --git a/SmartDeviceLink/SDLHapticHitTester.h b/SmartDeviceLink/SDLFocusableItemHitTester.h
index 8345d23a4..fe5080500 100644
--- a/SmartDeviceLink/SDLHapticHitTester.h
+++ b/SmartDeviceLink/SDLFocusableItemHitTester.h
@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
-@protocol SDLHapticHitTester <NSObject>
+@protocol SDLFocusableItemHitTester <NSObject>
/**
Determines which view was selected based on SDLTouch object. If no view gets matched null value will be returned.
diff --git a/SmartDeviceLink/SDLHapticManager.h b/SmartDeviceLink/SDLFocusableItemLocator.h
index 785234594..377b72571 100644
--- a/SmartDeviceLink/SDLHapticManager.h
+++ b/SmartDeviceLink/SDLFocusableItemLocator.h
@@ -7,12 +7,12 @@
#import <UIKit/UIKit.h>
-#import "SDLHapticInterface.h"
-#import "SDLHapticHitTester.h"
+#import "SDLFocusableItemLocatorType.h"
+#import "SDLFocusableItemHitTester.h"
NS_ASSUME_NONNULL_BEGIN
-@interface SDLHapticManager : NSObject <SDLHapticInterface, SDLHapticHitTester>
+@interface SDLFocusableItemLocator : NSObject <SDLFocusableItemLocatorType, SDLFocusableItemHitTester>
@property (nonatomic, assign) BOOL enableHapticDataRequests;
diff --git a/SmartDeviceLink/SDLHapticManager.m b/SmartDeviceLink/SDLFocusableItemLocator.m
index c055bc81a..b6107d686 100644
--- a/SmartDeviceLink/SDLHapticManager.m
+++ b/SmartDeviceLink/SDLFocusableItemLocator.m
@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
-#import "SDLHapticManager.h"
+#import "SDLFocusableItemLocator.h"
#import "SDLNotificationConstants.h"
#import "SDLRectangle.h"
#import "SDLHapticRect.h"
@@ -16,7 +16,7 @@
NS_ASSUME_NONNULL_BEGIN
-@interface SDLHapticManager()
+@interface SDLFocusableItemLocator()
/**
The projection window associated with the Haptic Manager
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
@end
-@implementation SDLHapticManager
+@implementation SDLFocusableItemLocator
- (instancetype)initWithWindow:(UIWindow *)window connectionManager:(id<SDLConnectionManagerType>)connectionManager{
self = [super init];
diff --git a/SmartDeviceLink/SDLHapticInterface.h b/SmartDeviceLink/SDLFocusableItemLocatorType.h
index 2b8c3fa83..dc4d9488b 100644
--- a/SmartDeviceLink/SDLHapticInterface.h
+++ b/SmartDeviceLink/SDLFocusableItemLocatorType.h
@@ -12,7 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
-@protocol SDLHapticInterface <NSObject>
+@protocol SDLFocusableItemLocatorType <NSObject>
/**
Whether or not this will attempt to send haptic RPCs.
diff --git a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.h b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.h
index ef8cb57c9..cdd611200 100644
--- a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.h
+++ b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.h
@@ -21,7 +21,7 @@
@class SDLTouchManager;
@class SDLVideoStreamingFormat;
-@protocol SDLHapticInterface;
+@protocol SDLFocusableItemLocatorType;
@protocol SDLStreamingMediaManagerDataSource;
NS_ASSUME_NONNULL_BEGIN
@@ -67,7 +67,7 @@ extern SDLAudioStreamState *const SDLAudioStreamStateShuttingDown;
/**
A haptic interface that can be updated to reparse views within the window you've provided. Send a `SDLDidUpdateProjectionView` notification or call the `updateInterfaceLayout` method to reparse. The "output" of this haptic interface occurs in the `touchManager` property where it will call the delegate.
*/
-@property (nonatomic, strong, readonly, nullable) id<SDLHapticInterface> hapticInterface;
+@property (nonatomic, strong, readonly, nullable) id<SDLFocusableItemLocatorType> focusableItemManager;
/**
A data source for the streaming manager's preferred resolutions and preferred formats.
diff --git a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
index 1d6baf13d..9e37dd472 100644
--- a/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
+++ b/SmartDeviceLink/SDLStreamingMediaLifecycleManager.m
@@ -19,7 +19,7 @@
#import "SDLGetSystemCapability.h"
#import "SDLGetSystemCapabilityResponse.h"
#import "SDLGlobals.h"
-#import "SDLHapticManager.h"
+#import "SDLFocusableItemLocator.h"
#import "SDLHMICapabilities.h"
#import "SDLImageResolution.h"
#import "SDLLogMacros.h"
@@ -105,9 +105,9 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
_connectionManager = connectionManager;
if (configuration.window != nil) {
- _hapticInterface = [[SDLHapticManager alloc] initWithWindow:configuration.window connectionManager:_connectionManager];
+ _focusableItemManager = [[SDLFocusableItemLocator alloc] initWithWindow:configuration.window connectionManager:_connectionManager];
}
- _touchManager = [[SDLTouchManager alloc] initWithHitTester:(id)_hapticInterface];
+ _touchManager = [[SDLTouchManager alloc] initWithHitTester:(id)_focusableItemManager];
_videoEncoderSettings = configuration.customVideoEncoderSettings ?: SDLH264VideoEncoder.defaultVideoEncoderSettings;
_requestedEncryptionType = configuration.maximumDesiredEncryption;
@@ -323,8 +323,8 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
weakSelf.preferredResolutions = [weakSelf.dataSource resolutionFromHeadUnitPreferredResolution:weakSelf.preferredResolutions.firstObject];
}
- if (weakSelf.hapticInterface != nil) {
- weakSelf.hapticInterface.enableHapticDataRequests = capability.hapticSpatialDataSupported.boolValue;
+ if (weakSelf.focusableItemManager != nil) {
+ weakSelf.focusableItemManager.enableHapticDataRequests = capability.hapticSpatialDataSupported.boolValue;
}
SDLLogD(@"Got specialized video capabilites, preferred formats: %@, resolutions: %@ haptics enabled %@", weakSelf.preferredFormats, weakSelf.preferredResolutions, (capability.hapticSpatialDataSupported.boolValue ? @"YES" : @"NO"));
@@ -335,8 +335,8 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
weakSelf.preferredFormats = @[format];
weakSelf.preferredResolutions = @[resolution];
- if (weakSelf.hapticInterface != nil) {
- weakSelf.hapticInterface.enableHapticDataRequests = NO;
+ if (weakSelf.focusableItemManager != nil) {
+ weakSelf.focusableItemManager.enableHapticDataRequests = NO;
}
SDLLogD(@"Using generic video capabilites, preferred formats: %@, resolutions: %@, haptics disabled", weakSelf.preferredFormats, weakSelf.preferredResolutions);
diff --git a/SmartDeviceLink/SDLStreamingMediaManager.h b/SmartDeviceLink/SDLStreamingMediaManager.h
index b3cc34ec1..07d06d1fb 100644
--- a/SmartDeviceLink/SDLStreamingMediaManager.h
+++ b/SmartDeviceLink/SDLStreamingMediaManager.h
@@ -16,7 +16,7 @@
@class SDLTouchManager;
@class SDLVideoStreamingFormat;
-@protocol SDLHapticInterface;
+@protocol SDLFocusableItemLocatorType;
@protocol SDLConnectionManagerType;
NS_ASSUME_NONNULL_BEGIN
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
A haptic interface that can be updated to reparse views within the window you've provided. Send a `SDLDidUpdateProjectionView` notification or call the `updateInterfaceLayout` method to reparse. The "output" of this haptic interface occurs in the `touchManager` property where it will call the delegate.
*/
-@property (nonatomic, strong, readonly, nullable) id<SDLHapticInterface> hapticInterface;
+@property (nonatomic, strong, readonly, nullable) id<SDLFocusableItemLocatorType> focusableItemManager;
/**
* Whether or not video streaming is supported
diff --git a/SmartDeviceLink/SDLStreamingMediaManager.m b/SmartDeviceLink/SDLStreamingMediaManager.m
index 87a277398..c9688ea8a 100644
--- a/SmartDeviceLink/SDLStreamingMediaManager.m
+++ b/SmartDeviceLink/SDLStreamingMediaManager.m
@@ -67,8 +67,8 @@ NS_ASSUME_NONNULL_BEGIN
return self.lifecycleManager.touchManager;
}
-- (nullable id<SDLHapticInterface>)hapticInterface {
- return self.lifecycleManager.hapticInterface;
+- (nullable id<SDLFocusableItemLocatorType>)focusableItemManager {
+ return self.lifecycleManager.focusableItemManager;
}
- (BOOL)isStreamingSupported {
diff --git a/SmartDeviceLink/SDLTouchManager.m b/SmartDeviceLink/SDLTouchManager.m
index 799f930d7..4c9417961 100644
--- a/SmartDeviceLink/SDLTouchManager.m
+++ b/SmartDeviceLink/SDLTouchManager.m
@@ -11,7 +11,7 @@
#import "CGPoint_Util.h"
#import "dispatch_timer.h"
-#import "SDLHapticHitTester.h"
+#import "SDLFocusableItemHitTester.h"
#import "SDLLogMacros.h"
#import "SDLNotificationConstants.h"
#import "SDLOnTouchEvent.h"
@@ -80,13 +80,13 @@ static NSUInteger const MaximumNumberOfTouches = 2;
/**
A hit tester that allows us to check for a view based on coordinates, if available.
*/
-@property (nonatomic, weak, nullable) id<SDLHapticHitTester> hitTester;
+@property (nonatomic, weak, nullable) id<SDLFocusableItemHitTester> hitTester;
@end
@implementation SDLTouchManager
-- (instancetype)initWithHitTester:(nullable id<SDLHapticHitTester>)hitTester {
+- (instancetype)initWithHitTester:(nullable id<SDLFocusableItemHitTester>)hitTester {
self = [super init];
if (!self) {
return nil;
diff --git a/SmartDeviceLinkTests/ProxySpecs/SDLHapticManagerSpec.m b/SmartDeviceLinkTests/ProxySpecs/SDLHapticManagerSpec.m
index 28bc1d4c9..d3a3656ef 100644
--- a/SmartDeviceLinkTests/ProxySpecs/SDLHapticManagerSpec.m
+++ b/SmartDeviceLinkTests/ProxySpecs/SDLHapticManagerSpec.m
@@ -9,7 +9,7 @@
#import <Nimble/Nimble.h>
#import <OCMock/OCMock.h>
-#import "SDLHapticManager.h"
+#import "SDLFocusableItemLocator.h"
#import "SDLSendHapticData.h"
#import "SDLManager.h"
#import "SDLTouchCoord.h"
@@ -33,7 +33,7 @@ describe(@"the haptic manager", ^{
__block UIWindow *uiWindow;
__block UIViewController *uiViewController;
- __block SDLHapticManager *hapticManager;
+ __block SDLFocusableItemLocator *hapticManager;
__block SDLSendHapticData* sentHapticRequest;
__block id sdlLifecycleManager = OCMClassMock([SDLLifecycleManager class]);
@@ -64,7 +64,7 @@ describe(@"the haptic manager", ^{
UITextField *textField1 = [[UITextField alloc] initWithFrame:viewRect1];
[uiWindow insertSubview:textField1 aboveSubview:uiWindow];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = NO;
[hapticManager updateInterfaceLayout];
});
@@ -78,7 +78,7 @@ describe(@"the haptic manager", ^{
context(@"when initialized with no focusable view", ^{
beforeEach(^{
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
[hapticManager updateInterfaceLayout];
});
@@ -94,7 +94,7 @@ describe(@"the haptic manager", ^{
UITextField *textField1 = [[UITextField alloc] initWithFrame:viewRect1];
[uiWindow insertSubview:textField1 aboveSubview:uiWindow];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
@@ -121,7 +121,7 @@ describe(@"the haptic manager", ^{
UIButton *button = [[UIButton alloc] initWithFrame:viewRect1];
[uiWindow addSubview:button];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
@@ -144,7 +144,7 @@ describe(@"the haptic manager", ^{
context(@"when initialized with no views and then updated with two additional views", ^{
beforeEach(^{
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
@@ -192,7 +192,7 @@ describe(@"the haptic manager", ^{
UITextField *textField2 = [[UITextField alloc] initWithFrame:viewRect2];
[textField addSubview:textField2];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
@@ -230,7 +230,7 @@ describe(@"the haptic manager", ^{
UITextField *textField2 = [[UITextField alloc] initWithFrame:viewRect2];
[button addSubview:textField2];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
@@ -265,7 +265,7 @@ describe(@"the haptic manager", ^{
UITextField *textField2 = [[UITextField alloc] initWithFrame:viewRect2];
[uiViewController.view addSubview:textField2];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
@@ -296,7 +296,7 @@ describe(@"the haptic manager", ^{
UITextField *textField1 = [[UITextField alloc] initWithFrame:viewRect1];
[uiViewController.view addSubview:textField1];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
@@ -335,7 +335,7 @@ describe(@"the haptic manager", ^{
UITextField *textField2 = [[UITextField alloc] initWithFrame:CGRectMake(201, 201, 50, 50)];
[uiViewController.view addSubview:textField2];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
@@ -357,7 +357,7 @@ describe(@"the haptic manager", ^{
UITextField *textField2 = [[UITextField alloc] initWithFrame:CGRectMake(126, 126, 50, 50)];
[uiViewController.view addSubview:textField2];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
@@ -373,7 +373,7 @@ describe(@"the haptic manager", ^{
UITextField *textField1 = [[UITextField alloc] initWithFrame:CGRectMake(101, 101, 50, 50)];
[uiWindow insertSubview:textField1 aboveSubview:uiWindow];
- hapticManager = [[SDLHapticManager alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
+ hapticManager = [[SDLFocusableItemLocator alloc] initWithWindow:uiWindow connectionManager:sdlLifecycleManager];
hapticManager.enableHapticDataRequests = YES;
[hapticManager updateInterfaceLayout];
});
diff --git a/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m b/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m
index 510c36bc1..d20ed828a 100644
--- a/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m
+++ b/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m
@@ -17,8 +17,8 @@
#import "SDLGetSystemCapability.h"
#import "SDLGetSystemCapabilityResponse.h"
#import "SDLGlobals.h"
-#import "SDLHapticInterface.h"
-#import "SDLHapticManager.h"
+#import "SDLFocusableItemLocatorType.h"
+#import "SDLFocusableItemLocator.h"
#import "SDLHMILevel.h"
#import "SDLImageResolution.h"
#import "SDLNotificationConstants.h"
@@ -73,7 +73,7 @@ describe(@"the streaming media manager", ^{
it(@"should initialize properties", ^{
expect(streamingLifecycleManager.touchManager).toNot(beNil());
- expect(streamingLifecycleManager.hapticInterface).toNot(beNil());
+ expect(streamingLifecycleManager.focusableItemManager).toNot(beNil());
expect(@(streamingLifecycleManager.isStreamingSupported)).to(equal(@NO));
expect(@(streamingLifecycleManager.isVideoConnected)).to(equal(@NO));
expect(@(streamingLifecycleManager.isAudioConnected)).to(equal(@NO));
@@ -435,7 +435,7 @@ describe(@"the streaming media manager", ^{
expect(streamingLifecycleManager.preferredFormats.firstObject.protocol).to(equal(testDataSource.extraFormat.protocol));
// The haptic manager should be enabled
- expect(streamingLifecycleManager.hapticInterface.enableHapticDataRequests).to(equal(YES));
+ expect(streamingLifecycleManager.focusableItemManager.enableHapticDataRequests).to(equal(YES));
});
it(@"should have decided upon the correct preferred format and resolution", ^{
diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m
index a36c213ae..43a2f6fab 100644
--- a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m
+++ b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m
@@ -13,7 +13,7 @@
#import <OCMock/OCMock.h>
#import "SDLNotificationConstants.h"
-#import "SDLHapticManager.h"
+#import "SDLFocusableItemLocator.h"
#import "SDLOnTouchEvent.h"
#import "SDLPinchGesture.h"
#import "SDLRPCNotificationNotification.h"