diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2020-10-19 11:20:23 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2020-10-19 11:20:23 -0400 |
commit | 3cefe68fb7e42aafc5764bc20773906d6d604d99 (patch) | |
tree | 3946edff758b9b02adbd39b81ff67bdf5f1433d6 | |
parent | e109768174641e228ea0712a68a2b5d62f852289 (diff) | |
download | sdl_ios-bugfix/issue-1782-example-app-soft-button-reset.tar.gz |
Fix example apps resetting the soft buttons unnecessarilybugfix/issue-1782-example-app-soft-button-reset
-rw-r--r-- | Example Apps/Example ObjC/ProxyManager.m | 4 | ||||
-rw-r--r-- | Example Apps/Example Swift/ProxyManager.swift | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m index 63650372b..ed2c057e3 100644 --- a/Example Apps/Example ObjC/ProxyManager.m +++ b/Example Apps/Example ObjC/ProxyManager.m @@ -169,7 +169,6 @@ NS_ASSUME_NONNULL_BEGIN [self.sdlManager.screenManager changeLayout:[[SDLTemplateConfiguration alloc] initWithPredefinedLayout:SDLPredefinedLayoutNonMedia] withCompletionHandler:nil]; [self sdlex_updateScreen]; - self.sdlManager.screenManager.softButtonObjects = [self.buttonManager allScreenSoftButtons]; } - (nullable RefreshUIHandler)refreshUIHandler { @@ -244,8 +243,9 @@ NS_ASSUME_NONNULL_BEGIN // This is our first time in a non-NONE state self.firstHMILevel = newLevel; - // Send static menu items. + // Send static menu items and soft buttons [self sdlex_createMenus]; + self.sdlManager.screenManager.softButtonObjects = [self.buttonManager allScreenSoftButtons]; // Subscribe to vehicle data. [self.vehicleDataManager subscribeToVehicleOdometer]; diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift index b0a93edda..bce2617ad 100644 --- a/Example Apps/Example Swift/ProxyManager.swift +++ b/Example Apps/Example Swift/ProxyManager.swift @@ -165,8 +165,9 @@ extension ProxyManager: SDLManagerDelegate { // This is our first time in a non-NONE state firstHMILevelState = newLevel - // Send static menu items. + // Send static menu items and soft buttons createMenuAndGlobalVoiceCommands() + sdlManager.screenManager.softButtonObjects = buttonManager.allScreenSoftButtons() // Subscribe to vehicle data. vehicleDataManager.subscribeToVehicleOdometer() @@ -254,7 +255,6 @@ private extension ProxyManager { sdlManager.screenManager.changeLayout(SDLTemplateConfiguration(predefinedLayout: .nonMedia), withCompletionHandler: nil) updateScreen() - sdlManager.screenManager.softButtonObjects = buttonManager.allScreenSoftButtons() } /// Update the UI's textfields, images and soft buttons |