From 37cec1cc84c28eeec4f3a99e4322b6bf17d61ab5 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 16 Jan 2020 17:04:37 +0200 Subject: [PATCH] Add plugins preferences description --- OsmAnd/res/values/strings.xml | 4 ++++ .../osmand/access/AccessibilityPlugin.java | 21 +++++++------------ OsmAnd/src/net/osmand/plus/OsmandPlugin.java | 14 +++++++++---- .../audionotes/AudioVideoNotesPlugin.java | 2 +- .../development/OsmandDevelopmentPlugin.java | 13 +----------- .../plus/mapillary/MapillaryPlugin.java | 15 ------------- .../monitoring/OsmandMonitoringPlugin.java | 2 +- .../openseamapsplugin/NauticalMapsPlugin.java | 17 +-------------- .../osmand/plus/osmedit/OsmEditingPlugin.java | 2 +- .../parkingpoint/ParkingPositionPlugin.java | 15 ------------- .../rastermaps/OsmandRasterMapsPlugin.java | 15 ------------- .../plus/skimapsplugin/SkiMapsPlugin.java | 15 ------------- .../osmand/plus/srtmplugin/SRTMPlugin.java | 15 ------------- 13 files changed, 26 insertions(+), 124 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 1ff730827a..0e3aee8ea8 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,10 @@ Thx - Hardy --> + Navigation, logging accuracy + Picture size, audio and video quality + Login, password, offline editing + Choose icon, color and name Allow you to share current location using trip recording. Online tracking Logging accuracy diff --git a/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java b/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java index f3dd366a57..23d1d25a34 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java +++ b/OsmAnd/src/net/osmand/access/AccessibilityPlugin.java @@ -1,9 +1,5 @@ package net.osmand.access; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - import android.app.Activity; import android.media.AudioManager; import android.media.SoundPool; @@ -12,10 +8,13 @@ import android.support.annotation.NonNull; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; -import net.osmand.plus.activities.MapActivity; import net.osmand.plus.settings.AccessibilitySettingsFragment; import net.osmand.plus.settings.BaseSettingsFragment; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + public class AccessibilityPlugin extends OsmandPlugin { public static final int DIRECTION_NOTIFICATION = 1; @@ -30,7 +29,7 @@ public class AccessibilityPlugin extends OsmandPlugin { public AccessibilityPlugin(OsmandApplication app) { this.app = app; } - + @Override public boolean init(@NonNull final OsmandApplication app, Activity activity) { sounds = new SoundPool(1, AudioManager.STREAM_MUSIC, 0); @@ -57,11 +56,6 @@ public class AccessibilityPlugin extends OsmandPlugin { return app.getString(R.string.shared_string_accessibility); } - @Override - public void registerLayers(MapActivity activity) { - } - - @Override public Class getSettingsActivity() { return SettingsAccessibilityActivity.class; @@ -74,7 +68,7 @@ public class AccessibilityPlugin extends OsmandPlugin { @Override public String getPrefsDescription() { - return null; + return app.getString(R.string.accessibility_prefs_descr); } @Override @@ -110,5 +104,4 @@ public class AccessibilityPlugin extends OsmandPlugin { return 0; } } - -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java index 1b70378841..9aa4551a84 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java +++ b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java @@ -66,8 +66,6 @@ public abstract class OsmandPlugin { public abstract String getDescription(); - public abstract String getPrefsDescription(); - public abstract int getAssetResourceName(); @DrawableRes @@ -75,9 +73,17 @@ public abstract class OsmandPlugin { return R.drawable.ic_extension_dark; } - public abstract Class getSettingsActivity(); + public Class getSettingsActivity() { + return null; + } - public abstract Class getSettingsFragment(); + public Class getSettingsFragment() { + return null; + } + + public String getPrefsDescription() { + return null; + } public String getVersion() { return ""; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index fc71413639..f68060fc76 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -1797,7 +1797,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { @Override public String getPrefsDescription() { - return null; + return app.getString(R.string.multimedia_notes_prefs_descr); } @Override diff --git a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java index ac2370ab92..1e3d2a983d 100644 --- a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java +++ b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java @@ -30,7 +30,6 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin { //ApplicationMode.regWidgetVisibility("fps", new ApplicationMode[0]); } - @Override public String getId() { return ID; @@ -126,16 +125,6 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin { return SettingsDevelopmentActivity.class; } - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } - @Override public int getLogoResourceId() { return R.drawable.ic_plugin_developer; @@ -150,4 +139,4 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin { public DashFragmentData getCardFragment() { return DashSimulateFragment.FRAGMENT_DATA; } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java index f8507a86e1..e3ef951edc 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryPlugin.java @@ -140,21 +140,6 @@ public class MapillaryPlugin extends OsmandPlugin { } } - @Override - public Class getSettingsActivity() { - return null; - } - - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } - @Override public void registerLayerContextMenuActions(final OsmandMapTileView mapView, ContextMenuAdapter adapter, final MapActivity mapActivity) { ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.OnRowItemClick() { diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index 8d706ec18d..fd53e92811 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -155,7 +155,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { @Override public String getPrefsDescription() { - return null; + return app.getString(R.string.monitoring_prefs_descr); } /** diff --git a/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java b/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java index 22b5313ea2..60133000a0 100644 --- a/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java @@ -121,19 +121,4 @@ public class NauticalMapsPlugin extends OsmandPlugin { public String getId() { return ID; } - - @Override - public Class getSettingsActivity() { - return null; - } - - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index f67548778a..389aea9377 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -199,7 +199,7 @@ public class OsmEditingPlugin extends OsmandPlugin { @Override public String getPrefsDescription() { - return null; + return app.getString(R.string.osm_editing_prefs_descr); } @Override diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index c858ee4c80..2e068d9cb8 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -518,21 +518,6 @@ public class ParkingPositionPlugin extends OsmandPlugin { parkingPlaceControl.setIcons(R.drawable.widget_parking_day, R.drawable.widget_parking_night); return parkingPlaceControl; } - - @Override - public Class getSettingsActivity() { - return null; - } - - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } @Override public int getAssetResourceName() { diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java index 9899b586fb..728cd6b652 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java @@ -407,21 +407,6 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { } } - @Override - public Class getSettingsActivity() { - return SettingsRasterMapsActivity.class; - } - - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } - public static void installMapLayers(final Activity activity, final ResultMatcher result) { final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandSettings settings = app.getSettings(); diff --git a/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java b/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java index 51fd9d1061..b188b3b33d 100644 --- a/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/skimapsplugin/SkiMapsPlugin.java @@ -89,19 +89,4 @@ public class SkiMapsPlugin extends OsmandPlugin { public String getId() { return ID; } - - @Override - public Class getSettingsActivity() { - return null; - } - - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java index d063cfb5c0..19eccbbf44 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java @@ -420,21 +420,6 @@ public class SRTMPlugin extends OsmandPlugin { @Override public void disable(OsmandApplication app) { } - - @Override - public Class getSettingsActivity() { - return null; - } - - @Override - public Class getSettingsFragment() { - return null; - } - - @Override - public String getPrefsDescription() { - return null; - } public static void refreshMapComplete(final MapActivity activity) { activity.getMyApplication().getResourceManager().getRenderer().clearCache();