diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index ab45459701..6d7abb46fe 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -991,14 +991,18 @@ public class OsmandApplication extends MultiDexApplication { } } - public void restartApp(Context ctx) { + public void restartApp(final Context ctx) { AlertDialog.Builder bld = new AlertDialog.Builder(ctx); bld.setMessage(R.string.restart_is_required); bld.setPositiveButton(R.string.shared_string_ok, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - android.os.Process.killProcess(android.os.Process.myPid()); + if (ctx instanceof MapActivity) { + MapActivity.doRestart(ctx); + } else { + android.os.Process.killProcess(android.os.Process.myPid()); + } } }); bld.show(); diff --git a/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java index 0673d6ca37..e840a8dcb5 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java @@ -106,7 +106,7 @@ public class GlobalSettingsFragment extends BaseSettingsFragment implements Send OsmandApplication app = getMyApplication(); if (app != null && activity != null) { app.checkPreferredLocale(); - activity.recreate(); + app.restartApp(activity); } } }