Fix #3799
This commit is contained in:
parent
f683a519a6
commit
e8a0763ef6
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,7 @@ import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
import android.support.multidex.MultiDex;
|
import android.support.multidex.MultiDex;
|
||||||
import android.support.multidex.MultiDexApplication;
|
import android.support.multidex.MultiDexApplication;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
@ -32,6 +33,7 @@ import net.osmand.data.LatLon;
|
||||||
import net.osmand.map.OsmandRegions;
|
import net.osmand.map.OsmandRegions;
|
||||||
import net.osmand.map.WorldRegion;
|
import net.osmand.map.WorldRegion;
|
||||||
import net.osmand.osm.MapPoiTypes;
|
import net.osmand.osm.MapPoiTypes;
|
||||||
|
import net.osmand.osm.io.NetworkUtils;
|
||||||
import net.osmand.plus.AppInitializer.AppInitializeListener;
|
import net.osmand.plus.AppInitializer.AppInitializeListener;
|
||||||
import net.osmand.plus.access.AccessibilityMode;
|
import net.osmand.plus.access.AccessibilityMode;
|
||||||
import net.osmand.plus.activities.DayNightHelper;
|
import net.osmand.plus.activities.DayNightHelper;
|
||||||
|
@ -143,6 +145,9 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
appCustomization.setup(this);
|
appCustomization.setup(this);
|
||||||
osmandSettings = appCustomization.getOsmandSettings();
|
osmandSettings = appCustomization.getOsmandSettings();
|
||||||
appInitializer.initVariables();
|
appInitializer.initVariables();
|
||||||
|
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("enable_proxy", false)) {
|
||||||
|
NetworkUtils.setProxy(osmandSettings.PROXY_HOST.get(), osmandSettings.PROXY_PORT.get());
|
||||||
|
}
|
||||||
if (appInitializer.isAppVersionChanged() && appInitializer.getPrevAppVersion() < AppInitializer.VERSION_2_3) {
|
if (appInitializer.isAppVersionChanged() && appInitializer.getPrevAppVersion() < AppInitializer.VERSION_2_3) {
|
||||||
osmandSettings.freezeExternalStorageDirectory();
|
osmandSettings.freezeExternalStorageDirectory();
|
||||||
} else if (appInitializer.isFirstTime()) {
|
} else if (appInitializer.isFirstTime()) {
|
||||||
|
|
Loading…
Reference in a new issue