diff options
author | Frank Elias <francois.elias@livio.io> | 2020-11-20 17:08:30 -0500 |
---|---|---|
committer | Frank Elias <francois.elias@livio.io> | 2020-11-20 17:08:30 -0500 |
commit | 03f7c2055442afbe7c00fca1116b75df04abc713 (patch) | |
tree | 5f9ba27ff1580f747e918a043306adace41e15ab | |
parent | 9de3fee5b73a8ea7b66fb10f18a24d75bc98f2a6 (diff) | |
download | sdl_ios-bugfix/issue-1827-Example-app-reset-template-when-HMI-level-changes.tar.gz |
-rw-r--r-- | Example Apps/Example ObjC/ProxyManager.m | 8 | ||||
-rw-r--r-- | Example Apps/Example Swift/ProxyManager.swift | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m index d93fb8565..0d13454d7 100644 --- a/Example Apps/Example ObjC/ProxyManager.m +++ b/Example Apps/Example ObjC/ProxyManager.m @@ -164,6 +164,10 @@ NS_ASSUME_NONNULL_BEGIN } - (void)sdlex_showInitialData { + // Send static menu items and soft buttons + [self sdlex_createMenus]; + self.sdlManager.screenManager.softButtonObjects = [self.buttonManager allScreenSoftButtons]; + if (![self.sdlManager.hmiLevel isEqualToEnum:SDLHMILevelFull]) { return; } [self.sdlManager.screenManager changeLayout:[[SDLTemplateConfiguration alloc] initWithPredefinedLayout:SDLPredefinedLayoutNonMedia] withCompletionHandler:nil]; @@ -243,10 +247,6 @@ NS_ASSUME_NONNULL_BEGIN // This is our first time in a non-NONE state self.firstHMILevel = newLevel; - // 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 1e68f9f32..8a53e7c76 100644 --- a/Example Apps/Example Swift/ProxyManager.swift +++ b/Example Apps/Example Swift/ProxyManager.swift @@ -165,10 +165,6 @@ extension ProxyManager: SDLManagerDelegate { // This is our first time in a non-NONE state firstHMILevelState = newLevel - // Send static menu items and soft buttons - createMenuAndGlobalVoiceCommands() - sdlManager.screenManager.softButtonObjects = buttonManager.allScreenSoftButtons() - // Subscribe to vehicle data. vehicleDataManager.subscribeToVehicleOdometer() @@ -252,6 +248,10 @@ private extension ProxyManager { /// Set the template and create the UI func showInitialData() { + // Send static menu items and soft buttons + createMenuAndGlobalVoiceCommands() + sdlManager.screenManager.softButtonObjects = buttonManager.allScreenSoftButtons() + guard sdlManager.hmiLevel == .full else { return } sdlManager.screenManager.changeLayout(SDLTemplateConfiguration(predefinedLayout: .nonMedia), withCompletionHandler: nil) |