diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java index 50bd4a6c86..dc0e599f3a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java @@ -23,6 +23,7 @@ import android.support.v7.app.AlertDialog; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Toast; + import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.osm.io.NetworkUtils; @@ -334,7 +335,12 @@ public class SettingsGeneralActivity extends SettingsBaseActivity { private void showAppDirDialogV19() { AlertDialog.Builder bld = new AlertDialog.Builder(this); - ChooseAppDirFragment frg = new DashChooseAppDirFragment.ChooseAppDirFragment(this, (Dialog) null); + ChooseAppDirFragment frg = new DashChooseAppDirFragment.ChooseAppDirFragment(this, (Dialog) null) { + @Override + protected void successCallback() { + updateApplicationDirTextAndSummary(); + } + }; bld.setView(frg.initView(getLayoutInflater(), null, null)); AlertDialog dlg = bld.show(); frg.setDialog(dlg); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java index 2cf95a7d61..b40fbbf01e 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java @@ -316,6 +316,7 @@ public class DashChooseAppDirFragment { boolean changed = !currentAppFile.getAbsolutePath().equals(selectedFile.getAbsolutePath()); getMyApplication().setExternalStorageDirectory(type, selectedFile.getAbsolutePath()); if (changed) { + successCallback(); reloadData(); } if (fragment != null && activity instanceof FragmentActivity) { @@ -333,6 +334,9 @@ public class DashChooseAppDirFragment { }; } + // To be implemented by subclass + protected void successCallback() {} + protected void reloadData() { new ReloadData(activity, getMyApplication()).execute((Void) null); }