From 65a8abe29cbaca57cb5e9aa2eeff83d8d717433c Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 11 Aug 2018 16:31:52 +0200 Subject: [PATCH] Fix issues --- OsmAnd/src/net/osmand/plus/AppInitializer.java | 1 - OsmAnd/src/net/osmand/plus/resources/ResourceManager.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) 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();