-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Integration for haptic manager into the SMM #753
Conversation
* Interface tweaks to SDLHapticHitTester, now just takes a point instead of a touch * SMM configuration has a window property that, if set, will create the haptic manager in the SMM * When the SMM receives video capabilities, it will check the `hapticSpatialDataSupported` property and enable / disable the haptic manager’s sending of RPCs based on it * TouchManager now takes an optional haptic hit tester to check view locations * TouchManagerDelegate now has view passthrough on many delegate methods
* Fixes to test cases to make them clearer
Touch Manager tests were attempted to be updated, but OCMock crashed. They should be entirely rewritten without OCMock if possible. |
SmartDeviceLink/SDLHapticManager.m
Outdated
if ((currentView.canBecomeFocused || isButton) && focusableSubviews.count == 0) { | ||
//if current view is focusable and it doesn't have any focusable sub views then add the cuurent view and return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling
if (configuration.window != nil) { | ||
_hapticInterface = [[SDLHapticManager alloc] initWithWindow:configuration.window connectionManager:_connectionManager]; | ||
} | ||
// __weak typeof(_hapticInterface) weakHaptic = _hapticInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out code can be removed
} | ||
// __weak typeof(_hapticInterface) weakHaptic = _hapticInterface; | ||
_touchManager = [[SDLTouchManager alloc] initWithHitTester:_hapticInterface]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am getting a warning for _touchManager
initialization.
Sending 'id _Nullable __strong' to parameter of incompatible type 'id _Nullable'
Casting _hapticInterface
to id
clears this warning for me.
_touchManager = [[SDLTouchManager alloc] initWithHitTester:(id)_hapticInterface]
Fixes #698, #728
This PR is ready for review.
Risk
This PR makes major API changes.
Testing Plan
Tests must still be developed
Summary
This PR integrates the haptic manager (PR #751) into the streaming media manager (SMM) and the associated touch manager (TM). The flow now looks like this:
UIWindow
onSDLStreamingMediaConfiguration
, or not.SDLHapticManager
is created on theSDLStreamingMediaManager
. It is started with sending haptic RPCs disabled.SDLTouchManager
with the haptic manager if it exists (depending on whether the window was set on the configuration).Changelog
Breaking Changes
SDLTouchManagerDelegate
now has view passthrough on many delegate methodsEnhancements
SDLHapticHitTester
, now just takes a point instead of a touchhapticSpatialDataSupported
property and enable / disable the haptic manager’s sending of RPCs based on itTasks Remaining:
CLA