Fix crash
This commit is contained in:
parent
8cb90bbce3
commit
bb81c0e532
4 changed files with 3 additions and 5 deletions
|
@ -501,10 +501,10 @@ public class MapActivityActions implements DialogProvider {
|
|||
mode = ApplicationMode.CAR;
|
||||
}
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
app.initVoiceCommandPlayer(mapActivity);
|
||||
TargetPointsHelper targets = app.getTargetPointsHelper();
|
||||
app.getSettings().APPLICATION_MODE.set(mode);
|
||||
app.getRoutingHelper().setAppMode(mode);
|
||||
app.initVoiceCommandPlayer(mapActivity);
|
||||
// save application mode controls
|
||||
settings.FOLLOW_THE_ROUTE.set(false);
|
||||
app.getRoutingHelper().setFollowingMode(false);
|
||||
|
|
|
@ -537,9 +537,7 @@ public class RoutingHelper {
|
|||
// trigger voice prompt only if new route is in forward direction
|
||||
// If route is in wrong direction after one more setLocation it will be recalculated
|
||||
if (!wrongMovementDirection || newRoute) {
|
||||
if(isFollowingMode) {
|
||||
voiceRouter.newRouteIsCalculated(newRoute);
|
||||
}
|
||||
voiceRouter.newRouteIsCalculated(newRoute);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ public class MapNavigateControl extends MapControls {
|
|||
routingHelper.setRoutePlanningMode(false);
|
||||
mapActivity.getMapViewTrackingUtilities().switchToRoutePlanningMode();
|
||||
routingHelper.setCurrentLocation(app.getLocationProvider().getLastKnownLocation(), false);
|
||||
app.initVoiceCommandPlayer(mapActivity);
|
||||
app.getRoutingHelper().notifyIfRouteIsCalculated();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer {
|
|||
prologSystem.addTheory(new Theory("appMode('"+m.getStringKey().toLowerCase()+"')."));
|
||||
prologSystem.addTheory(new Theory("measure('"+mc.toTTSString()+"')."));
|
||||
prologSystem.addTheory(new Theory(config));
|
||||
config.close();
|
||||
} catch (InvalidTheoryException e) {
|
||||
log.error("Loading voice config exception " + voiceProvider, e); //$NON-NLS-1$
|
||||
wrong = true;
|
||||
|
|
Loading…
Reference in a new issue