diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index 03321e9a19..355a3f85c6 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -205,10 +205,6 @@ public class AppInitializer implements IProgress { app.getSettings().migratePreferences(); startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_5).commit(); } - if (prevAppVersion < VERSION_3_5 || Version.getAppVersion(app).equals("3.5.3")) { - app.getSettings().migrateHomeWorkParkingToFavorites(); - startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_5).commit(); - } if (prevAppVersion < VERSION_3_6) { app.getSettings().migratePreferences(); startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_6).commit(); @@ -221,6 +217,13 @@ public class AppInitializer implements IProgress { initSettings = true; } + void migrateHomeWorkFromSettings() { + if (prevAppVersion < VERSION_3_5 || Version.getAppVersion(app).equals("3.5.3")) { + app.getSettings().migrateHomeWorkParkingToFavorites(); + startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_5).commit(); + } + } + public int getNumberOfStarts() { if(startPrefs == null) { return 0; diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index b71dec40ec..36dd01892a 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -190,6 +190,7 @@ public class OsmandApplication extends MultiDexApplication { checkPreferredLocale(); appInitializer.onCreateApplication(); + appInitializer.migrateHomeWorkFromSettings(); // if(!osmandSettings.FOLLOW_THE_ROUTE.get()) { // targetPointsHelper.clearPointToNavigate(false); // }