correct an issue with outdated PREV_APPLICATION_MODE after changes of app profile via quickchanger and subsequent only-show routing

This commit is contained in:
sonora 2012-10-09 16:26:56 +02:00
parent 66a5fb8b9f
commit 11d7c6ee75

View file

@ -481,6 +481,13 @@ public class MapActivityActions implements DialogProvider {
AccessibleToast.makeText(mapActivity, R.string.unknown_from_location, Toast.LENGTH_LONG).show(); AccessibleToast.makeText(mapActivity, R.string.unknown_from_location, Toast.LENGTH_LONG).show();
return; return;
} }
// PREV_APPLICATION_MODE also needs to be set here to overwrite possibly outdated value from prior follow-navigation in different profile
// Do not overwrite PREV_APPLICATION_MODE if already navigating
if (!routingHelper.isFollowingMode()) {
settings.PREV_APPLICATION_MODE.set(settings.APPLICATION_MODE.get());
}
ApplicationMode mode = getAppMode(buttons, settings); ApplicationMode mode = getAppMode(buttons, settings);
routingHelper.setAppMode(mode); routingHelper.setAppMode(mode);
settings.OPTIMAL_ROUTE_MODE.setModeValue(mode, !nonoptimal.isChecked()); settings.OPTIMAL_ROUTE_MODE.setModeValue(mode, !nonoptimal.isChecked());