diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 3968ca0eca..dd3977a80b 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -211,7 +211,7 @@ public class OsmandApplication extends Application { public void onTerminate() { super.onTerminate(); if (routingHelper != null) { - routingHelper.getVoiceRouter().onApplicationTerminate(this); + routingHelper.getVoiceRouter().onApplicationTerminate(); } } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 37cd8de3a9..c888428038 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -951,6 +951,7 @@ public class MapActivityActions implements DialogProvider { if(getMyApplication().getLocationProvider().getLocationSimulation().isRouteAnimating()) { getMyApplication().getLocationProvider().getLocationSimulation().startStopRouteAnimation(mapActivity); } + routingHelper.getVoiceRouter().interruptRouteCommands(); routingHelper.clearCurrentRoute(null, new ArrayList()); routingHelper.setRoutePlanningMode(false); settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get()); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index 5f71dc142b..31daa2b40f 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -793,7 +793,7 @@ public class VoiceRouter { // } //} - public void onApplicationTerminate(Context ctx) { + public void onApplicationTerminate() { if (player != null) { player.clear(); }