pr cleanup
This commit is contained in:
parent
a351668860
commit
ab96fe684e
2 changed files with 7 additions and 10 deletions
|
@ -1032,10 +1032,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
return mIsDestroyed;
|
||||
}
|
||||
|
||||
public boolean isActivityStopped() {
|
||||
return stopped;
|
||||
}
|
||||
|
||||
private void restartApp() {
|
||||
AlertDialog.Builder bld = new AlertDialog.Builder(this);
|
||||
bld.setMessage(R.string.storage_permission_restart_is_required);
|
||||
|
|
|
@ -372,13 +372,14 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
|||
isSaving = false;
|
||||
app.getNotificationHelper().refreshNotifications();
|
||||
updateControl();
|
||||
if (weakReferenceToActivity != null && weakReferenceToActivity.get() instanceof MapActivity
|
||||
&& !((MapActivity) weakReferenceToActivity.get()).isActivityStopped()
|
||||
&& !((MapActivity) weakReferenceToActivity.get()).isActivityDestroyed()
|
||||
&& !Algorithms.isEmpty(result.getFilenames())) {
|
||||
OnSaveCurrentTrackFragment.showInstance(((MapActivity) weakReferenceToActivity.get())
|
||||
.getSupportFragmentManager(), result.getFilenames().get(0));
|
||||
if (weakReferenceToActivity != null) {
|
||||
final Activity a = weakReferenceToActivity.get();
|
||||
if (a instanceof MapActivity && !a.isFinishing() && !Algorithms.isEmpty(result.getFilenames())) {
|
||||
OnSaveCurrentTrackFragment.showInstance(((MapActivity) a)
|
||||
.getSupportFragmentManager(), result.getFilenames().get(0));
|
||||
}
|
||||
}
|
||||
|
||||
if (onComplete != null) {
|
||||
onComplete.run();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue