diff options
-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) |