From 988b916ddb8ba71243f4e3be651131d20d8af405 Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 6 Jun 2018 15:53:20 +0300 Subject: [PATCH] renamed executeWithParams params --- .../osmand/plus/quickaction/SwitchableAction.java | 2 +- .../plus/quickaction/actions/MapOverlayAction.java | 8 ++++---- .../plus/quickaction/actions/MapSourceAction.java | 10 +++++----- .../plus/quickaction/actions/MapStyleAction.java | 12 ++++++------ .../plus/quickaction/actions/MapUnderlayAction.java | 10 +++++----- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java index 7e85375d8b..8869df04c9 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/SwitchableAction.java @@ -105,7 +105,7 @@ public abstract class SwitchableAction extends QuickAction { public abstract List loadListFromParams(); - public abstract void executeWithParams(MapActivity mapActivity, String params); + public abstract void executeWithParams(MapActivity activity, String params); protected void showChooseDialog(FragmentManager fm) { SelectMapViewQuickActionsBottomSheet fragment = new SelectMapViewQuickActionsBottomSheet(); diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java index 9579588567..09a40aa407 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapOverlayAction.java @@ -104,10 +104,10 @@ public class MapOverlayAction extends SwitchableAction> { } @Override - public void executeWithParams(MapActivity mapActivity, String params) { + public void executeWithParams(MapActivity activity, String params) { OsmandRasterMapsPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class); if (plugin != null) { - OsmandSettings settings = mapActivity.getMyApplication().getSettings(); + OsmandSettings settings = activity.getMyApplication().getSettings(); boolean hasOverlay = !params.equals(KEY_NO_OVERLAY); if (hasOverlay) { settings.MAP_OVERLAY.set(params); @@ -116,8 +116,8 @@ public class MapOverlayAction extends SwitchableAction> { settings.MAP_OVERLAY.set(null); settings.MAP_OVERLAY_PREVIOUS.set(null); } - plugin.updateMapLayers(mapActivity.getMapView(), settings.MAP_OVERLAY, mapActivity.getMapLayers()); - Toast.makeText(mapActivity, mapActivity.getString(R.string.quick_action_map_overlay_switch, params), Toast.LENGTH_SHORT).show(); + plugin.updateMapLayers(activity.getMapView(), settings.MAP_OVERLAY, activity.getMapLayers()); + Toast.makeText(activity, activity.getString(R.string.quick_action_map_overlay_switch, params), Toast.LENGTH_SHORT).show(); } } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java index 079078e83c..84a830ebdb 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapSourceAction.java @@ -98,17 +98,17 @@ public class MapSourceAction extends SwitchableAction> { } @Override - public void executeWithParams(MapActivity mapActivity, String params) { - OsmandSettings settings = mapActivity.getMyApplication().getSettings(); + public void executeWithParams(MapActivity activity, String params) { + OsmandSettings settings = activity.getMyApplication().getSettings(); if (params.equals(LAYER_OSM_VECTOR)) { settings.MAP_ONLINE_DATA.set(false); - mapActivity.getMapLayers().updateMapSource(mapActivity.getMapView(), null); + activity.getMapLayers().updateMapSource(activity.getMapView(), null); } else { settings.MAP_TILE_SOURCES.set(params); settings.MAP_ONLINE_DATA.set(true); - mapActivity.getMapLayers().updateMapSource(mapActivity.getMapView(), settings.MAP_TILE_SOURCES); + activity.getMapLayers().updateMapSource(activity.getMapView(), settings.MAP_TILE_SOURCES); } - Toast.makeText(mapActivity, mapActivity.getString(R.string.quick_action_map_source_switch, params), Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, activity.getString(R.string.quick_action_map_source_switch, params), Toast.LENGTH_SHORT).show(); } @Override diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java index 8a4ccba8f0..2a923f2940 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java @@ -59,19 +59,19 @@ public class MapStyleAction extends SwitchableAction { } @Override - public void executeWithParams(MapActivity mapActivity, String params) { - OsmandApplication app = mapActivity.getMyApplication(); + public void executeWithParams(MapActivity activity, String params) { + OsmandApplication app = activity.getMyApplication(); RenderingRulesStorage loaded = app.getRendererRegistry().getRenderer(params); if (loaded != null) { - OsmandMapTileView view = mapActivity.getMapView(); + OsmandMapTileView view = activity.getMapView(); view.getSettings().RENDERER.set(params); app.getRendererRegistry().setCurrentSelectedRender(loaded); - ConfigureMapMenu.refreshMapComplete(mapActivity); + ConfigureMapMenu.refreshMapComplete(activity); - Toast.makeText(mapActivity, mapActivity.getString(R.string.quick_action_map_style_switch, params), Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, activity.getString(R.string.quick_action_map_style_switch, params), Toast.LENGTH_SHORT).show(); } else { - Toast.makeText(mapActivity, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show(); + Toast.makeText(activity, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show(); } } diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java index 733ab5139e..590d06b388 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapUnderlayAction.java @@ -103,10 +103,10 @@ public class MapUnderlayAction extends SwitchableAction> { } @Override - public void executeWithParams(MapActivity mapActivity, String params) { + public void executeWithParams(MapActivity activity, String params) { OsmandRasterMapsPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class); if (plugin != null) { - OsmandSettings settings = mapActivity.getMyApplication().getSettings(); + OsmandSettings settings = activity.getMyApplication().getSettings(); boolean hasUnderlay = !params.equals(KEY_NO_UNDERLAY); if (hasUnderlay) { settings.MAP_UNDERLAY.set(params); @@ -116,11 +116,11 @@ public class MapUnderlayAction extends SwitchableAction> { settings.MAP_UNDERLAY_PREVIOUS.set(null); } final OsmandSettings.CommonPreference hidePolygonsPref = - mapActivity.getMyApplication().getSettings().getCustomRenderBooleanProperty("noPolygons"); + activity.getMyApplication().getSettings().getCustomRenderBooleanProperty("noPolygons"); hidePolygonsPref.set(hasUnderlay); - plugin.updateMapLayers(mapActivity.getMapView(), settings.MAP_UNDERLAY, mapActivity.getMapLayers()); - Toast.makeText(mapActivity, mapActivity.getString(R.string.quick_action_map_underlay_switch, params), Toast.LENGTH_SHORT).show(); + plugin.updateMapLayers(activity.getMapView(), settings.MAP_UNDERLAY, activity.getMapLayers()); + Toast.makeText(activity, activity.getString(R.string.quick_action_map_underlay_switch, params), Toast.LENGTH_SHORT).show(); } }