| 139 | } |
| 140 | |
| 141 | static std::string getLauncherAppId() { |
| 142 | settings::BootSettings boot_properties; |
| 143 | // When boot.properties hasn't been overridden, return default |
| 144 | if (!settings::loadBootSettings(boot_properties)) { |
| 145 | return CONFIG_TT_LAUNCHER_APP_ID; |
| 146 | } |
| 147 | |
| 148 | // When boot properties didn't specify an override, return default |
| 149 | if (boot_properties.launcherAppId.empty()) { |
| 150 | LOGGER.error("Failed to load launcher configuration, or launcher not configured"); |
| 151 | return CONFIG_TT_LAUNCHER_APP_ID; |
| 152 | } |
| 153 | |
| 154 | // If the app in the boot.properties does not exist, return default |
| 155 | if (findAppManifestById(boot_properties.launcherAppId) == nullptr) { |
| 156 | LOGGER.error("Launcher app {} not found", boot_properties.launcherAppId); |
| 157 | return CONFIG_TT_LAUNCHER_APP_ID; |
| 158 | } |
| 159 | |
| 160 | // The boot.properties launcher app id is valid |
| 161 | return boot_properties.launcherAppId; |
| 162 | } |
| 163 | |
| 164 | static void startNextApp() { |
| 165 | #ifdef ESP_PLATFORM |
nothing calls this directly
no test coverage detected