make voice router SHUT THE FUCK OUT after cancelling navigation

This commit is contained in:
Bars107 2014-12-24 17:38:13 +02:00
parent 368139bc1c
commit 1f9cd1f907
3 changed files with 3 additions and 2 deletions

View file

@ -211,7 +211,7 @@ public class OsmandApplication extends Application {
public void onTerminate() { public void onTerminate() {
super.onTerminate(); super.onTerminate();
if (routingHelper != null) { if (routingHelper != null) {
routingHelper.getVoiceRouter().onApplicationTerminate(this); routingHelper.getVoiceRouter().onApplicationTerminate();
} }
} }

View file

@ -951,6 +951,7 @@ public class MapActivityActions implements DialogProvider {
if(getMyApplication().getLocationProvider().getLocationSimulation().isRouteAnimating()) { if(getMyApplication().getLocationProvider().getLocationSimulation().isRouteAnimating()) {
getMyApplication().getLocationProvider().getLocationSimulation().startStopRouteAnimation(mapActivity); getMyApplication().getLocationProvider().getLocationSimulation().startStopRouteAnimation(mapActivity);
} }
routingHelper.getVoiceRouter().interruptRouteCommands();
routingHelper.clearCurrentRoute(null, new ArrayList<LatLon>()); routingHelper.clearCurrentRoute(null, new ArrayList<LatLon>());
routingHelper.setRoutePlanningMode(false); routingHelper.setRoutePlanningMode(false);
settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get()); settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get());

View file

@ -793,7 +793,7 @@ public class VoiceRouter {
// } // }
//} //}
public void onApplicationTerminate(Context ctx) { public void onApplicationTerminate() {
if (player != null) { if (player != null) {
player.clear(); player.clear();
} }