New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SDL-0119 - SDL Passenger Mode #1296
Implement SDL-0119 - SDL Passenger Mode #1296
Conversation
Parse lockScreenDismissalEnabled Save last notification to instance variable
Test getter and setter of lockScreenDismissalEnabled Update pointer syntax
Add readonly lockScreenDismissableEnabled property in SDLLockScreenManager.h Refactor SDLLockScreenManager.m
Remove extra notification
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.
@SatbirTanda I've found a few required changes, per the accepted proposal
- Actual: No message is displayed that indicates you can dismiss the lock screen. Expected: "Dismissals should include a warning to the user and ensure that they are not the driver."
- Actual: Currently, the user has to swipe down to dismiss the lock screen. Expected: "the proposed solution is to have a swipe up gesture to dismiss the lock screen"
Need translations - will need string to be localized
Fix merge conflicts for 6.3.0
Also note that I have submitted a PR for revisions to this proposal: smartdevicelink/sdl_evolution#775 |
Update for revision to proposal
Delete LSM from SDLProxy
@theresalech ready for review |
Remove SDLOnLockScreenStatus notification obeservation from SDLLockscreenManagerSpec
@theresalech ready for re-review |
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.
As I mentioned in my slack message, I have come to the realization that the SDLOnLockScreenStatus
changes are major changes and will have to be reverted to their original state. SDLOnLockScreenStatus
should be deprecated and warnings ignored. I apologize for not realizing the impact of that change earlier.
@theresalech ready for re-review |
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.
Just a few more small issues
Make recommended fixes, fix spec
Fix for proposal
@theresalech ready for review |
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 did full testing against Core and everything seems to work correctly, however there are just a few minor issues remaining.
|
||
- (void)addDismissGestureWithCallback:(SwipeGestureCallbackBlock)swipeGestureCallback { | ||
self.dismissGestureCallback = swipeGestureCallback; | ||
UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(sdl_didSwipeToDismiss:)]; |
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.
Is it possible for this to be called multiple times and multiple dismiss gestures to be added? It seems like it is. This would probably be fixed by holding a reference to the gesture recognizer as a private property, and then checking if it already exists and not re-adding it?
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.
Sounds good, pushed changes
} | ||
|
||
- (void)removeDismissGesture { | ||
self.view.gestureRecognizers = [[NSArray alloc] init]; |
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.
In combination with the above change, this should just call removeGestureRecognizer:
with the stored gesture and then the stored gesture cleared.
Make recommended fix
Set gesture to nil after its removed
Resolves #932
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Add unit test
Summary
Observe OnDriverDistraction notification from LockScreenManager, parse lockScreenDismissalEnabled, and enabled/disabled swipe gesture based on that
CLA