This commit is contained in:
PavelRatushny 2017-05-25 11:35:06 +03:00
parent 2ec8826fdb
commit 5f9663ef31

View file

@ -574,7 +574,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
.objectEquals(targets.getIntermediatePointsLatLonNavigation(), routingHelper.getIntermediatePoints()))) {
targets.updateRouteAndRefresh(true);
}
app.getLocationProvider().resumeAllUpdates();
if (settings != null && settings.isLastKnownMapLocation() && !intentLocation) {
LatLon l = settings.getLastKnownMapLocation();
@ -939,6 +938,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
super.onStart();
wakeLockHelper.onStart(this);
getMyApplication().getNotificationHelper().showNotifications();
app.getLocationProvider().resumeAllUpdates();
}
protected void setProgressDlg(Dialog progressDlg) {
@ -957,6 +958,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
// mNotificationManager.notify(APP_NOTIFICATION_ID, getNotification());
// }
// }
app.getLocationProvider().pauseAllUpdates();
wakeLockHelper.onStop(this);
getMyApplication().getNotificationHelper().removeNotifications();
super.onStop();
@ -1013,7 +1016,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
atlasMapRendererView.handleOnPause();
}
super.onPause();
app.getLocationProvider().pauseAllUpdates();
app.getDaynightHelper().stopSensorIfNeeded();
settings.APPLICATION_MODE.removeListener(applicationModeListener);