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,13 +654,16 @@ public class FirstUsageWizardFragment extends Fragment implements OsmAndLocation
} }
public void closeWizard() { public void closeWizard() {
getActivity().getSupportFragmentManager().beginTransaction() FragmentActivity activity = getActivity();
.remove(FirstUsageWizardFragment.this).commit(); if (activity != null) {
location = null; activity.getSupportFragmentManager().beginTransaction()
localDownloadRegion = null; .remove(FirstUsageWizardFragment.this).commit();
localMapIndexItem = null; location = null;
baseMapIndexItem = null; localDownloadRegion = null;
wizardClosed = true; localMapIndexItem = null;
baseMapIndexItem = null;
wizardClosed = true;
}
} }
public void processLocationPermission(boolean granted) { public void processLocationPermission(boolean granted) {