Skip to content
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

Reset screen manager after disconnects #956

Merged
merged 9 commits into from
May 15, 2018

Conversation

NicoleYarroch
Copy link
Contributor

@NicoleYarroch NicoleYarroch commented May 9, 2018

Fixes #952, #953

This PR is ready for review.

Risk

This PR makes minor API changes.

Testing Plan

Smoke tests

Summary

Fixes the SDLScreenManager not being reset when the app is reconnected to a head unit during a session. Menus, images, and buttons were not being set correctly on reconnects due the saved settings in the SDLScreenManager's sub managers.

Changelog

Enhancements
  • The SDLTextAndGraphicManager, SDLSoftButtonManager, SDLMenuManager, and SDLVoiceCommandManager are now reset when the app disconnects from the head unit.
Bug Fixes
  • Added a nil check for a menu cell's handler before it is called.
Tasks Remaining
  • Fix broken test cases

CLA

* added `stop` methods to the screen manager helpers to reset their stored properties on disconnection
* Includes `screenManager`, `menuManager`, `softButtonManager`, `textAndGraphicsManager`, `voiceCommandManager`

Signed-off-by: NicoleYarroch <[email protected]>
Signed-off-by: NicoleYarroch <[email protected]>
Signed-off-by: NicoleYarroch <[email protected]>
@NicoleYarroch NicoleYarroch self-assigned this May 9, 2018
@NicoleYarroch NicoleYarroch added this to the 6.0.0 milestone May 9, 2018
@NicoleYarroch NicoleYarroch added the bug A defect in the library label May 9, 2018
@NicoleYarroch NicoleYarroch changed the title WIP: Reset screen manager after a disconnect Reset screen manager after disconnects May 14, 2018
@@ -52,7 +52,7 @@ A show describing the current text and images on the screen (not soft buttons, e
@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
@property (strong, nonatomic, nullable) SDLHMILevel currentLevel;

@property (strong, nonatomic) SDLArtwork *blankArtwork;
@property (strong, nonatomic, nullable) SDLArtwork *blankArtwork;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be reset to nil

Copy link
Contributor Author

@NicoleYarroch NicoleYarroch May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in issue #953, I am getting a sdl_fileManager_fileDoesNotExistError for the blank artwork when I try to use it on reconnects. Setting the blank artwork to nil on disconnect was the only way I could fix the problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, put a comment explaining that where it's reset.

@@ -589,7 +614,7 @@ - (BOOL)hasQueuedUpdate {
return (_hasQueuedUpdate || _queuedUpdateHandler != nil);
}

- (SDLArtwork *)blankArtwork {
- (nullable SDLArtwork *)blankArtwork {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't reset to nil

@joeljfischer
Copy link
Contributor

That was meant to be a "request changes"

@joeljfischer joeljfischer merged commit cc5eae8 into develop May 15, 2018
@joeljfischer joeljfischer deleted the bugfix/issue_952_reset_menu_manager branch May 15, 2018 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants