diff --git a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java index 9ad611000d..82bc936d22 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java @@ -76,6 +76,7 @@ public class NavigationNotification extends OsmandNotification { RoutingHelper routingHelper = app.getRoutingHelper(); routingHelper.setRoutePlanningMode(false); routingHelper.setFollowingMode(true); + routingHelper.setCurrentLocation(app.getLocationProvider().getLastKnownLocation(), false); } }, new IntentFilter(OSMAND_RESUME_NAVIGATION_SERVICE_ACTION)); @@ -131,7 +132,6 @@ public class NavigationNotification extends OsmandNotification { turnBitmap = null; ongoing = true; RoutingHelper routingHelper = app.getRoutingHelper(); - boolean followingMode = routingHelper.isFollowingMode() || app.getLocationProvider().getLocationSimulation().isRouteAnimating(); if (service != null && (service.getUsedBy() & USED_BY_NAVIGATION) != 0) { color = app.getResources().getColor(R.color.osmand_orange); @@ -146,7 +146,7 @@ public class NavigationNotification extends OsmandNotification { int nextTurnDistance = 0; int nextNextTurnDistance = 0; RouteDirectionInfo ri = null; - if (routingHelper.isRouteCalculated() && followingMode) { + if (routingHelper.isRouteCalculated() && routingHelper.isFollowingMode()) { deviatedFromRoute = routingHelper.isDeviatedFromRoute(); if (deviatedFromRoute) { @@ -230,7 +230,7 @@ public class NavigationNotification extends OsmandNotification { notificationBuilder.addAction(R.drawable.ic_action_remove_dark, app.getString(R.string.shared_string_control_stop), stopPendingIntent); - if (routingHelper.isRouteCalculated() && followingMode) { + if (routingHelper.isRouteCalculated() && routingHelper.isFollowingMode()) { Intent pauseIntent = new Intent(OSMAND_PAUSE_NAVIGATION_SERVICE_ACTION); PendingIntent pausePendingIntent = PendingIntent.getBroadcast(app, 0, pauseIntent, PendingIntent.FLAG_UPDATE_CURRENT); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/NavResumePauseAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/NavResumePauseAction.java index 40d485296a..f94f4b5ec6 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/NavResumePauseAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/NavResumePauseAction.java @@ -30,6 +30,7 @@ public class NavResumePauseAction extends QuickAction { if (routingHelper.isRoutePlanningMode()) { routingHelper.setRoutePlanningMode(false); routingHelper.setFollowingMode(true); + routingHelper.setCurrentLocation(activity.getMyApplication().getLocationProvider().getLastKnownLocation(), false); } else { routingHelper.setRoutePlanningMode(true); routingHelper.setFollowingMode(false);