diff --git a/OsmAnd/src/net/osmand/plus/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/ApplicationMode.java index 989055834f..7aecd11413 100644 --- a/OsmAnd/src/net/osmand/plus/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/ApplicationMode.java @@ -174,7 +174,7 @@ public class ApplicationMode { } public static List allPossibleValues(OsmandSettings settings) { - return values; + return new ArrayList(values); } diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java index f7f95bf142..e2ba19169f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java @@ -311,6 +311,7 @@ public abstract class SettingsBaseActivity extends SherlockPreferenceActivity im @Override public void onClick(View v) { if(selected.size() > 0) { + // test setSelectedAppMode(selected.iterator().next()); } if(profileDialog != null && profileDialog.isShowing()) { diff --git a/OsmAnd/src/net/osmand/plus/activities/actions/NavigateAction.java b/OsmAnd/src/net/osmand/plus/activities/actions/NavigateAction.java index cebabbb6b0..f6712b5f91 100644 --- a/OsmAnd/src/net/osmand/plus/activities/actions/NavigateAction.java +++ b/OsmAnd/src/net/osmand/plus/activities/actions/NavigateAction.java @@ -373,7 +373,9 @@ public class NavigateAction { if(!showDefault) { values.remove(ApplicationMode.DEFAULT); } - selected.add(settings.getApplicationMode()); + if (showDefault || settings.getApplicationMode() != ApplicationMode.DEFAULT) { + selected.add(settings.getApplicationMode()); + } return prepareAppModeView(a, values, selected, parent, singleSelection, onClickListener); }