summaryrefslogtreecommitdiff
path: root/Example Apps/Example Swift
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-12-02 11:27:00 -0500
committerNicoleYarroch <nicole@livio.io>2020-12-02 11:27:00 -0500
commitf31523682fedcb7506b48988a4530b3dda52d366 (patch)
tree442edcae7b8ce2d7d8af52fd71ec8bd2d1b4c7f9 /Example Apps/Example Swift
parentbadc7e17170c06585ead186a88918cbe6f71e7c9 (diff)
parent4b0d338253b36f6281afc5267ab819c238c1a048 (diff)
downloadsdl_ios-f31523682fedcb7506b48988a4530b3dda52d366.tar.gz
Merge branch 'develop' into feature/issue_1579_alert_manager
Diffstat (limited to 'Example Apps/Example Swift')
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift12
1 files changed, 7 insertions, 5 deletions
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index bce2617ad..8a53e7c76 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -165,18 +165,16 @@ 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()
+
+ //Handle initial launch
+ showInitialData()
}
switch newLevel {
case .full:
// The SDL app is in the foreground. Always try to show the initial state to guard against some possible weird states. Duplicates will be ignored by Core.
- showInitialData()
subscribeButtonManager.subscribeToPresetButtons()
case .limited: break // An active NAV or MEDIA SDL app is in the background
case .background: break // The SDL app is not in the foreground
@@ -250,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)