diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 088f9c0cb2..cdd793c103 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -157,8 +157,7 @@ public class OsmandApplication extends MultiDexApplication { externalStorageDirectoryReadOnly = true; externalStorageDirectory = osmandSettings.getInternalAppPath(); } - osmandSettings.USE_MAP_MARKERS.set(true); - + checkPreferredLocale(); appInitializer.onCreateApplication(); // if(!osmandSettings.FOLLOW_THE_ROUTE.get()) { @@ -478,9 +477,7 @@ public class OsmandApplication extends MultiDexApplication { routingHelper.setRoutePlanningMode(false); osmandSettings.LAST_ROUTING_APPLICATION_MODE = osmandSettings.APPLICATION_MODE.get(); osmandSettings.APPLICATION_MODE.set(osmandSettings.DEFAULT_APPLICATION_MODE.get()); - if (osmandSettings.USE_MAP_MARKERS.get()) { - targetPointsHelper.removeAllWayPoints(false, false); - } + targetPointsHelper.removeAllWayPoints(false, false); } private void fullExit() { diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 454292c60f..95afd05a63 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1312,8 +1312,6 @@ public class OsmandSettings { public final OsmandPreference SHOULD_SHOW_FREE_VERSION_BANNER = new BooleanPreference("should_show_free_version_banner", false).makeGlobal().cache(); - public final OsmandPreference USE_MAP_MARKERS = new BooleanPreference("use_map_markers", true).makeGlobal().cache(); - public final OsmandPreference MARKERS_DISTANCE_INDICATION_ENABLED = new BooleanPreference("markers_distance_indication_enabled", true).makeProfile(); public final OsmandPreference DISPLAYED_MARKERS_WIDGETS_COUNT = new IntPreference("displayed_markers_widgets_count", 1).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 5f4dbdd064..31c0075fdc 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -291,8 +291,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven if (settings.FOLLOW_THE_ROUTE.get() && !app.getRoutingHelper().isRouteCalculated() && !app.getRoutingHelper().isRouteBeingCalculated()) { FailSafeFuntions.restoreRoutingMode(this); - } else if (app.getSettings().USE_MAP_MARKERS.get() - && !app.getRoutingHelper().isRoutePlanningMode() + } else if (!app.getRoutingHelper().isRoutePlanningMode() && !settings.FOLLOW_THE_ROUTE.get() && app.getTargetPointsHelper().getAllPoints().size() > 0) { app.getRoutingHelper().clearCurrentRoute(null, new ArrayList()); diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index f0e512db5d..958ee82ecd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -340,8 +340,7 @@ public class MapActivityActions implements DialogProvider { mapActivity.showQuickSearch(latitude, longitude); } else if (standardId == R.string.context_menu_item_directions_from) { mapActivity.getContextMenu().hide(); - if (settings.USE_MAP_MARKERS.get() - && getMyApplication().getTargetPointsHelper().getPointToNavigate() == null) { + if (getMyApplication().getTargetPointsHelper().getPointToNavigate() == null) { setFirstMapMarkerAsTarget(); } if (!mapActivity.getRoutingHelper().isFollowingMode() && !mapActivity.getRoutingHelper().isRoutePlanningMode()) { @@ -630,31 +629,18 @@ public class MapActivityActions implements DialogProvider { return true; } }).createItem()); - if (settings.USE_MAP_MARKERS.get()) { - optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.map_markers, mapActivity) - .setIcon(R.drawable.ic_action_flag_dark) - .setListener(new ContextMenuAdapter.ItemClickListener() { - @Override - public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) { - app.logEvent(mapActivity, "drawer_markers_open"); - MapActivity.clearPrevActivityIntent(); - MapMarkersDialogFragment.showInstance(mapActivity); - return true; - } - }).createItem()); - } else { - optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.waypoints, mapActivity) - .setIcon(R.drawable.ic_action_intermediate) - .setListener(new ContextMenuAdapter.ItemClickListener() { - @Override - public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) { - app.logEvent(mapActivity, "drawer_waypoints_open"); - MapActivity.clearPrevActivityIntent(); - mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS, viewCoordinates); - return false; - } - }).createItem()); - } + + optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.map_markers, mapActivity) + .setIcon(R.drawable.ic_action_flag_dark) + .setListener(new ContextMenuAdapter.ItemClickListener() { + @Override + public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked, int[] viewCoordinates) { + app.logEvent(mapActivity, "drawer_markers_open"); + MapActivity.clearPrevActivityIntent(); + MapMarkersDialogFragment.showInstance(mapActivity); + return true; + } + }).createItem()); optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.shared_string_my_places, mapActivity) .setIcon(R.drawable.ic_action_fav_dark) diff --git a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java index 6d0c671422..8ae30c267c 100644 --- a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java +++ b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java @@ -182,9 +182,7 @@ public class FailSafeFuntions { private static void notRestoreRoutingMode(MapActivity ma, OsmandApplication app){ ma.updateApplicationModeSettings(); app.getRoutingHelper().clearCurrentRoute(null, new ArrayList()); - if (app.getSettings().USE_MAP_MARKERS.get()) { - app.getTargetPointsHelper().removeAllWayPoints(false, false); - } + app.getTargetPointsHelper().removeAllWayPoints(false, false); ma.refreshMap(); } diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 16b1a0f29a..935cdea4e2 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -326,9 +326,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis hideDashboard(); if (visibleType == DashboardType.WAYPOINTS || visibleType == DashboardType.WAYPOINTS_FLAT) { mapActivity.getMapActions().stopNavigationWithoutConfirm(); - if (getMyApplication().getSettings().USE_MAP_MARKERS.get()) { - getMyApplication().getTargetPointsHelper().removeAllWayPoints(false, true); - } + getMyApplication().getTargetPointsHelper().removeAllWayPoints(false, true); mapActivity.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu().hide(); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index cb03d0aa3c..012c8b8893 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -753,8 +753,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL if (menuController != null) { return menuController.getWaypointActionStringId(); } - return settings.USE_MAP_MARKERS.get() - ? R.string.shared_string_add_to_map_markers : R.string.context_menu_item_destination_point; + return R.string.shared_string_add_to_map_markers; } public boolean isButtonWaypointEnabled() { @@ -771,8 +770,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL waypointActionIconId = menuController.getWaypointActionIconId(); } else { favActionIconId = R.drawable.map_action_fav_dark; - waypointActionIconId = settings.USE_MAP_MARKERS.get() - ? R.drawable.map_action_flag_dark : R.drawable.map_action_waypoint; + waypointActionIconId = R.drawable.map_action_flag_dark; } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index 940cab07d9..69c0393e27 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -434,13 +434,11 @@ public abstract class MenuController extends BaseMenuController implements Colla } public int getWaypointActionIconId() { - return getMapActivity().getMyApplication().getSettings().USE_MAP_MARKERS.get() - ? R.drawable.map_action_flag_dark : R.drawable.map_action_waypoint; + return R.drawable.map_action_flag_dark; } public int getWaypointActionStringId() { - return getMapActivity().getMyApplication().getSettings().USE_MAP_MARKERS.get() - ? R.string.shared_string_add_to_map_markers : R.string.context_menu_item_destination_point; + return R.string.shared_string_add_to_map_markers; } public boolean isWaypointButtonEnabled() { diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java index 818b8fd6d9..35a993b91c 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackPointFragment.java @@ -438,13 +438,8 @@ public class TrackPointFragment extends OsmandExpandableListFragment { if (!MenuItemCompat.isActionViewExpanded(mi)) { createMenuItem(menu, SHARE_ID, R.string.shared_string_share, R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_dark, MenuItemCompat.SHOW_AS_ACTION_NEVER); - if (getSettings().USE_MAP_MARKERS.get()) { - createMenuItem(menu, SELECT_MAP_MARKERS_ID, R.string.shared_string_add_to_map_markers, R.drawable.ic_action_flag_dark, - R.drawable.ic_action_flag_dark, MenuItemCompat.SHOW_AS_ACTION_NEVER); - } else { - createMenuItem(menu, SELECT_MAP_MARKERS_ID, R.string.select_destination_and_intermediate_points, R.drawable.ic_action_intermediate, - R.drawable.ic_action_intermediate, MenuItemCompat.SHOW_AS_ACTION_NEVER); - } + createMenuItem(menu, SELECT_MAP_MARKERS_ID, R.string.shared_string_add_to_map_markers, R.drawable.ic_action_flag_dark, + R.drawable.ic_action_flag_dark, MenuItemCompat.SHOW_AS_ACTION_NEVER); createMenuItem(menu, SELECT_FAVORITES_ID, R.string.shared_string_add_to_favorites, R.drawable.ic_action_fav_dark, R.drawable.ic_action_fav_dark, MenuItemCompat.SHOW_AS_ACTION_NEVER); createMenuItem(menu, DELETE_ID, R.string.shared_string_delete, R.drawable.ic_action_delete_dark, diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index b87ab44d40..ad36d0b88d 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -456,7 +456,7 @@ public class MapControlsLayer extends OsmandMapLayer { MapActivity.clearPrevActivityIntent(); RoutingHelper routingHelper = mapActivity.getRoutingHelper(); if (!routingHelper.isFollowingMode() && !routingHelper.isRoutePlanningMode()) { - if (settings.USE_MAP_MARKERS.get() && !hasTargets) { + if (!hasTargets) { getTargets().restoreTargetPoints(false); if (getTargets().getPointToNavigate() == null) { mapActivity.getMapActions().setFirstMapMarkerAsTarget(); diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java index bd8aa93f61..2a6c89d79a 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java @@ -168,17 +168,12 @@ public class MapInfoLayer extends OsmandMapLayer { TextInfoWidget time = ric.createTimeControl(map); registerSideWidget(time, new TimeControlWidgetState(app), "time", false, 15); - if (settings.USE_MAP_MARKERS.get()) { - TextInfoWidget marker = mwf.createMapMarkerControl(map, true); - registerSideWidget(marker, R.drawable.ic_action_flag_dark, R.string.map_marker_1st, "map_marker_1st", false, 16); - TextInfoWidget bearing = ric.createBearingControl(map); - registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 17); - TextInfoWidget marker2nd = mwf.createMapMarkerControl(map, false); - registerSideWidget(marker2nd, R.drawable.ic_action_flag_dark, R.string.map_marker_2nd, "map_marker_2nd", false, 18); - } else { - TextInfoWidget bearing = ric.createBearingControl(map); - registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 17); - } + TextInfoWidget marker = mwf.createMapMarkerControl(map, true); + registerSideWidget(marker, R.drawable.ic_action_flag_dark, R.string.map_marker_1st, "map_marker_1st", false, 16); + TextInfoWidget bearing = ric.createBearingControl(map); + registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 17); + TextInfoWidget marker2nd = mwf.createMapMarkerControl(map, false); + registerSideWidget(marker2nd, R.drawable.ic_action_flag_dark, R.string.map_marker_2nd, "map_marker_2nd", false, 18); TextInfoWidget speed = ric.createSpeedControl(map); registerSideWidget(speed, R.drawable.ic_action_speed, R.string.map_widget_speed, "speed", false, 20);