diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 02528208d6..26bdd7f245 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -2861,7 +2861,7 @@ public class OsmandSettings { public static final String QUICK_FAB_MARGIN_X_LANDSCAPE_MARGIN = "quick_fab_margin_x_landscape_margin"; public static final String QUICK_FAB_MARGIN_Y_LANDSCAPE_MARGIN = "quick_fab_margin_y_landscape_margin"; - public final CommonPreference QUICK_ACTION = new StringPreference("quick_action_new", "").makeProfile(); + public final CommonPreference QUICK_ACTION = new StringPreference("quick_action_new", "").makeGlobal(); public final CommonPreference QUICK_ACTION_LIST = new StringPreference("quick_action_list", "").makeGlobal(); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index ec9239f8f1..9f23747ad0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -664,9 +664,9 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { }); return true; } else if (preference == defaultSpeed) { - showSeekbarSettingsDialog(this, false); + showSeekbarSettingsDialog(this, false, settings.getApplicationMode()); } else if (preference == defaultSpeedOnly) { - showSeekbarSettingsDialog(this, true); + showSeekbarSettingsDialog(this, true, settings.getApplicationMode()); } return false; } @@ -720,14 +720,13 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { return bld.show(); } - public static void showSeekbarSettingsDialog(Activity activity, final boolean defaultSpeedOnly) { - if (activity == null) { + public static void showSeekbarSettingsDialog(Activity activity, final boolean defaultSpeedOnly, final ApplicationMode mode) { + if (activity == null || mode == null) { return; } final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandSettings settings = app.getSettings(); - final ApplicationMode mode = settings.getApplicationMode(); GeneralRouter router = getRouter(app.getRoutingConfig(), mode); SpeedConstants units = settings.SPEED_SYSTEM.get(); String speedUnits = units.toShortString(activity); diff --git a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java index a376145c6f..c0d3cff143 100644 --- a/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/VehicleParametersFragment.java @@ -102,7 +102,7 @@ public class VehicleParametersFragment extends BaseSettingsFragment implements O public boolean onPreferenceClick(Preference preference) { if (preference.getKey().equals(GeneralRouter.DEFAULT_SPEED)) { RouteService routeService = getSelectedAppMode().getRouteService(); - showSeekbarSettingsDialog(getActivity(), routeService == RouteService.STRAIGHT); + showSeekbarSettingsDialog(getActivity(), routeService == RouteService.STRAIGHT, getSelectedAppMode()); return true; } return super.onPreferenceClick(preference);