Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-09-22 18:08:36 +02:00
commit 6a3afad997

View file

@ -1,6 +1,7 @@
package net.osmand.plus.firstusage; package net.osmand.plus.firstusage;
import android.Manifest; import android.Manifest;
import android.app.Activity;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
@ -653,7 +654,9 @@ public class FirstUsageWizardFragment extends Fragment implements OsmAndLocation
} }
public void closeWizard() { public void closeWizard() {
getActivity().getSupportFragmentManager().beginTransaction() FragmentActivity activity = getActivity();
if (activity != null) {
activity.getSupportFragmentManager().beginTransaction()
.remove(FirstUsageWizardFragment.this).commit(); .remove(FirstUsageWizardFragment.this).commit();
location = null; location = null;
localDownloadRegion = null; localDownloadRegion = null;
@ -661,6 +664,7 @@ public class FirstUsageWizardFragment extends Fragment implements OsmAndLocation
baseMapIndexItem = null; baseMapIndexItem = null;
wizardClosed = true; wizardClosed = true;
} }
}
public void processLocationPermission(boolean granted) { public void processLocationPermission(boolean granted) {
if (granted) { if (granted) {