From 47fa5af8a6922dab8839c402be170a994176bfe2 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Wed, 25 Nov 2015 11:38:47 +0200 Subject: [PATCH] Fix 2.3 version --- .../src/net/osmand/plus/activities/MapActivity.java | 4 ++-- .../net/osmand/plus/download/DownloadActivity.java | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index b50e0c22a1..d716c6ae5c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -398,9 +398,9 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents { dashboardOnMap.setDashboardVisibility(true, DashboardOnMap.staticVisibleType); } else { if (ErrorBottomSheetDialog.shouldShow(settings, this)) { - new ErrorBottomSheetDialog().show(getFragmentManager(), "dialog"); + new ErrorBottomSheetDialog().show(getSupportFragmentManager(), "dialog"); } else if (RateUsBottomSheetDialog.shouldShow(settings)) { - new RateUsBottomSheetDialog().show(getFragmentManager(), "dialog"); + new RateUsBottomSheetDialog().show(getSupportFragmentManager(), "dialog"); } } } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 383d39ac44..ab5ed943d1 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -13,6 +13,7 @@ import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.view.ViewPager; +import android.support.v4.widget.Space; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.MenuItem; @@ -23,7 +24,6 @@ import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ProgressBar; -import android.support.v4.widget.Space; import android.widget.TextView; import android.widget.Toast; @@ -577,7 +577,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl GoToMapFragment fragment = new GoToMapFragment(); fragment.regionCenter = region.getRegionCenter(); fragment.regionName = region.getLocaleName(); - fragment.show(getFragmentManager(), GoToMapFragment.TAG); + fragment.show(getSupportFragmentManager(), GoToMapFragment.TAG); } private void showDownloadWorldMapIfNeeded() { @@ -590,7 +590,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl SUGGESTED_TO_DOWNLOAD_BASEMAP = true; AskMapDownloadFragment fragment = new AskMapDownloadFragment(); fragment.indexItem = worldMap; - fragment.show(getFragmentManager(), AskMapDownloadFragment.TAG); + fragment.show(getSupportFragmentManager(), AskMapDownloadFragment.TAG); } } @@ -599,7 +599,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl final boolean externalExists = getMyApplication().getSettings().getSecondaryStorage() != null; if (firstTime && externalExists && DataStoragePlaceDialogFragment.isInterestedInFirstTime) { - new DataStoragePlaceDialogFragment().show(getFragmentManager(), null); + new DataStoragePlaceDialogFragment().show(getSupportFragmentManager(), null); } } @@ -762,7 +762,8 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (savedInstanceState != null) { - regionName = savedInstanceState.getString(KEY_GOTO_MAP_REGION_NAME, ""); + regionName = savedInstanceState.getString(KEY_GOTO_MAP_REGION_NAME); + regionName = regionName == null ? "" : regionName; Object rCenterObj = savedInstanceState.getSerializable(KEY_GOTO_MAP_REGION_CENTER); if (rCenterObj != null) { regionCenter = (LatLon) rCenterObj;