Try change task order in AppInitializer to restart NavigationService

This commit is contained in:
sonora 2015-06-11 00:15:55 +02:00
parent d298d61294
commit dd5d721f21

View file

@ -396,6 +396,9 @@ public class AppInitializer implements IProgress {
private void saveGPXTracks() {
if(app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()){
app.startNavigationService(NavigationService.USED_BY_GPX);
}
if (app.savingTrackHelper.hasDataToSave()) {
long timeUpdated = app.savingTrackHelper.getLastTrackPointTime();
if (System.currentTimeMillis() - timeUpdated >= 1000 * 60 * 30) {
@ -409,9 +412,6 @@ public class AppInitializer implements IProgress {
app.savingTrackHelper.loadGpxFromDatabase();
}
}
if(app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()){
app.startNavigationService(NavigationService.USED_BY_GPX);
}
}