This commit is contained in:
Alexey Kulish 2016-07-03 15:54:13 +03:00
parent 39bac1983f
commit 63f5851721
3 changed files with 10 additions and 1 deletions

View file

@ -609,6 +609,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
enableDrawer();
}
public boolean isActivityDestroyed() {
return mIsDestroyed;
}
private void restartApp() {
AlertDialog.Builder bld = new AlertDialog.Builder(this);
bld.setMessage(R.string.storage_permission_restart_is_required);

View file

@ -1104,7 +1104,7 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
final boolean centered) {
try {
if (menu.getLatLon() == null) {
if (menu.getLatLon() == null || mapActivity.isActivityDestroyed()) {
return false;
}

View file

@ -100,6 +100,11 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi
}
public static void showInstance(final MapActivity mapActivity) {
if (mapActivity.isActivityDestroyed()) {
return;
}
MapMultiSelectionMenu menu = mapActivity.getContextMenu().getMultiSelectionMenu();
int slideInAnim = menu.getSlideInAnimation();