diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index 630296671d..bdc084d124 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -180,7 +180,6 @@ public class AppInitializer implements IProgress { if(prevAppVersion < VERSION_2_3) { startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_2_3).commit(); } else if (prevAppVersion < VERSION_3_2) { - app.getResourceManager().copyMissingJSAssets(); startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_2).commit(); } startPrefs.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit(); diff --git a/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java b/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java index 44db1f7a00..462668a87e 100644 --- a/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java +++ b/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java @@ -449,6 +449,9 @@ public class ResourceManager { public List checkAssets(IProgress progress, boolean forceUpdate) { String fv = Version.getFullVersion(context); + if(context.getAppInitializer().isAppVersionChanged()) { + copyMissingJSAssets(); + } if (!fv.equalsIgnoreCase(context.getSettings().PREVIOUS_INSTALLED_VERSION.get()) || forceUpdate) { File applicationDataDir = context.getAppPath(null); applicationDataDir.mkdirs();