autoUpdate static method
Forces auto update in respect to the configured AutoUpdateSettings.
Might also trigger the OffBoardListener.registerOnWorldwideRoadMapVersionUpdated/OffBoardListener.registerOnAvailableContentUpdate callbacks
Returns
- GemError.success if the operation could be started
- GemError.connectionRequired if the device has no internet connection.
Implementation
static GemError autoUpdate() {
if (offBoardListener.isAutoUpdateForRoadMapEnabled) {
final err = ContentStore.checkForUpdate(ContentType.roadMap);
if (err != GemError.success) return err;
}
if (offBoardListener.isAutoUpdateForViewStyleHighResEnabled) {
final err = ContentStore.checkForUpdate(ContentType.viewStyleHighRes);
if (err != GemError.success) return err;
}
if (offBoardListener.isAutoUpdateForViewStyleLowResEnabled) {
final err = ContentStore.checkForUpdate(ContentType.viewStyleLowRes);
if (err != GemError.success) return err;
}
if (offBoardListener.isAutoUpdateForHumanVoiceEnabled) {
final err = ContentStore.checkForUpdate(ContentType.humanVoice);
if (err != GemError.success) return err;
}
if (offBoardListener.isAutoUpdateForComputerVoiceEnabled) {
final err = ContentStore.checkForUpdate(ContentType.computerVoice);
if (err != GemError.success) return err;
}
if (offBoardListener.isAutoUpdateForCarModelEnabled) {
final err = ContentStore.checkForUpdate(ContentType.carModel);
if (err != GemError.success) return err;
}
return GemError.success;
}