From dc55878c922803a47ff6f534d5fde0dd9b8e312e Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 8 Oct 2020 22:45:39 +0300 Subject: [PATCH] Fix version upgrade and remove unnecessary changes --- .../osmand/plus/AppVersionUpgradeOnInit.java | 80 +++++++++---- .../osmand/plus/helpers/DayNightHelper.java | 28 ++--- .../plus/helpers/enums/AngularConstants.java | 3 +- .../plus/helpers/enums/AutoZoomMap.java | 4 +- .../plus/helpers/enums/DayNightMode.java | 2 +- .../plus/helpers/enums/DrivingRegion.java | 4 +- .../plus/helpers/enums/MetricsConstants.java | 3 +- .../plus/helpers/enums/SpeedConstants.java | 3 +- .../plus/mapmarkers/MapMarkersMode.java | 2 +- .../settings/backend/BooleanPreference.java | 8 +- .../backend/BooleanStringPreference.java | 4 +- .../settings/backend/CommonPreference.java | 53 +++++---- .../backend/ContextMenuItemsPreference.java | 8 +- .../backend/ContextMenuItemsSettings.java | 5 +- .../backend/EnumStringPreference.java | 8 +- .../settings/backend/FloatPreference.java | 8 +- .../backend/ImpassableRoadsStorage.java | 22 ++-- .../plus/settings/backend/IntPreference.java | 10 +- .../backend/IntermediatePointsStorage.java | 2 +- .../backend/ListStringPreference.java | 20 ++-- .../plus/settings/backend/LongPreference.java | 10 +- .../backend/MainContextMenuItemsSettings.java | 8 +- .../backend/OsmAndPreferencesDataStore.java | 10 +- .../settings/backend/OsmandPreference.java | 2 +- .../plus/settings/backend/OsmandSettings.java | 107 +++++------------- .../backend/PreferenceWithListener.java | 2 +- .../plus/settings/backend/SettingsHelper.java | 22 +++- .../backend/SettingsMapPointsStorage.java | 8 +- .../settings/backend/StringPreference.java | 8 +- .../src/net/osmand/plus/views/GPXLayer.java | 0 .../plus/views/layers/RulerControlLayer.java | 6 + .../osmand/plus/views/layers/RulerMode.java | 7 -- .../mapwidgets/MapInfoWidgetsFactory.java | 2 +- 33 files changed, 237 insertions(+), 232 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/views/GPXLayer.java delete mode 100644 OsmAnd/src/net/osmand/plus/views/layers/RulerMode.java diff --git a/OsmAnd/src/net/osmand/plus/AppVersionUpgradeOnInit.java b/OsmAnd/src/net/osmand/plus/AppVersionUpgradeOnInit.java index 49e354ea8b..9eeec4542b 100644 --- a/OsmAnd/src/net/osmand/plus/AppVersionUpgradeOnInit.java +++ b/OsmAnd/src/net/osmand/plus/AppVersionUpgradeOnInit.java @@ -7,8 +7,10 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; -import net.osmand.data.FavouritePoint; +import net.osmand.data.FavouritePoint.SpecialPointType; import net.osmand.data.LatLon; +import net.osmand.plus.AppInitializer.AppInitializeListener; +import net.osmand.plus.AppInitializer.InitEvents; import net.osmand.plus.api.SettingsAPI; import net.osmand.plus.settings.backend.ApplicationMode; import net.osmand.plus.settings.backend.CommonPreference; @@ -24,6 +26,7 @@ import java.util.List; import java.util.Map; class AppVersionUpgradeOnInit { + public static final String FIRST_TIME_APP_RUN = "FIRST_TIME_APP_RUN"; //$NON-NLS-1$ public static final String VERSION_INSTALLED_NUMBER = "VERSION_INSTALLED_NUMBER"; //$NON-NLS-1$ public static final String NUMBER_OF_STARTS = "NUMBER_OF_STARTS"; //$NON-NLS-1$ @@ -56,16 +59,14 @@ class AppVersionUpgradeOnInit { private int prevAppVersion; private boolean appVersionChanged; private boolean firstTime; - private OsmandSettings settings; AppVersionUpgradeOnInit(OsmandApplication app) { this.app = app; - settings = app.getSettings(); } @SuppressLint("ApplySharedPref") void upgradeVersion(SharedPreferences startPrefs, int lastVersion) { - if(!startPrefs.contains(NUMBER_OF_STARTS)) { + if (!startPrefs.contains(NUMBER_OF_STARTS)) { startPrefs.edit().putInt(NUMBER_OF_STARTS, 1).commit(); } else { startPrefs.edit().putInt(NUMBER_OF_STARTS, startPrefs.getInt(NUMBER_OF_STARTS, 0) + 1).commit(); @@ -81,7 +82,7 @@ class AppVersionUpgradeOnInit { } else { prevAppVersion = startPrefs.getInt(VERSION_INSTALLED_NUMBER, 0); if (needsUpgrade(startPrefs, lastVersion)) { - + OsmandSettings settings = app.getSettings(); if (prevAppVersion < VERSION_2_2) { settings.SHOW_DASHBOARD_ON_START.set(true); settings.SHOW_DASHBOARD_ON_MAP_SCREEN.set(true); @@ -121,13 +122,14 @@ class AppVersionUpgradeOnInit { startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_7).commit(); } if (prevAppVersion < VERSION_3_7_01) { - app.getAppInitializer().addListener(new AppInitializer.AppInitializeListener() { + app.getAppInitializer().addListener(new AppInitializeListener() { @Override public void onProgress(AppInitializer init, AppInitializer.InitEvents event) { - if (event.equals(AppInitializer.InitEvents.FAVORITES_INITIALIZED)) { + if (event.equals(InitEvents.FAVORITES_INITIALIZED)) { app.getFavorites().fixBlackBackground(); } } + @Override public void onFinish(AppInitializer init) { } @@ -158,20 +160,20 @@ class AppVersionUpgradeOnInit { } public void resetFirstTimeRun(SharedPreferences startPrefs) { - if(startPrefs != null) { + if (startPrefs != null) { startPrefs.edit().remove(FIRST_TIME_APP_RUN).commit(); } } public int getNumberOfStarts(SharedPreferences startPrefs) { - if(startPrefs == null) { + if (startPrefs == null) { return 0; } return startPrefs.getInt(NUMBER_OF_STARTS, 1); } public long getFirstInstalledDays(SharedPreferences startPrefs) { - if(startPrefs == null) { + if (startPrefs == null) { return 0; } long nd = startPrefs.getLong(FIRST_INSTALLED, 0); @@ -183,9 +185,8 @@ class AppVersionUpgradeOnInit { return firstTime; } - - public void migratePreferences() { + OsmandSettings settings = app.getSettings(); migrateEnumPreferences(); SharedPreferences globalSharedPreferences = (SharedPreferences) settings.getGlobalPreferences(); Map globalPrefsMap = globalSharedPreferences.getAll(); @@ -213,7 +214,7 @@ class AppVersionUpgradeOnInit { } } } - for (OsmandPreference pref : settings.getGeneralPrefs()) { + for (OsmandPreference pref : getGeneralPrefs()) { if (pref instanceof CommonPreference) { CommonPreference commonPref = (CommonPreference) pref; Object defaultVal = commonPref.getModeValue(ApplicationMode.DEFAULT); @@ -224,7 +225,6 @@ class AppVersionUpgradeOnInit { } } } - String json = settings.getSettingsAPI().getString(settings.getGlobalPreferences(), "custom_app_profiles", ""); if (!Algorithms.isEmpty(json)) { Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); @@ -241,9 +241,10 @@ class AppVersionUpgradeOnInit { } public void migrateEnumPreferences() { - for (OsmandPreference pref : settings.getRegisteredPreferences().values()) { + OsmandSettings settings = app.getSettings(); + for (OsmandPreference pref : settings.getRegisteredPreferences().values()) { if (pref instanceof EnumStringPreference) { - EnumStringPreference enumPref = (EnumStringPreference) pref; + EnumStringPreference enumPref = (EnumStringPreference) pref; if (enumPref.isGlobal()) { migrateEnumPref(enumPref, (SharedPreferences) settings.getGlobalPreferences()); } else { @@ -256,6 +257,7 @@ class AppVersionUpgradeOnInit { } public void migrateQuickActionStates() { + OsmandSettings settings = app.getSettings(); String quickActionsJson = settings.getSettingsAPI().getString(settings.getGlobalPreferences(), "quick_action_new", ""); if (!Algorithms.isEmpty(quickActionsJson)) { Gson gson = new GsonBuilder().create(); @@ -282,9 +284,10 @@ class AppVersionUpgradeOnInit { } public void migrateHomeWorkParkingToFavorites() { + OsmandSettings settings = app.getSettings(); FavouritesDbHelper favorites = app.getFavorites(); SettingsAPI settingsAPI = settings.getSettingsAPI(); - Object globalPreferences= settings.getGlobalPreferences(); + Object globalPreferences = settings.getGlobalPreferences(); LatLon homePoint = null; float lat = settingsAPI.getFloat(globalPreferences, "home_point_lat", 0); @@ -299,10 +302,47 @@ class AppVersionUpgradeOnInit { workPoint = new LatLon(lat, lon); } if (homePoint != null) { - favorites.setSpecialPoint(homePoint, FavouritePoint.SpecialPointType.HOME, null); + favorites.setSpecialPoint(homePoint, SpecialPointType.HOME, null); } if (workPoint != null) { - favorites.setSpecialPoint(workPoint, FavouritePoint.SpecialPointType.WORK, null); + favorites.setSpecialPoint(workPoint, SpecialPointType.WORK, null); } } -} + + + public OsmandPreference[] getGeneralPrefs() { + OsmandSettings settings = app.getSettings(); + return new OsmandPreference[] { + settings.EXTERNAL_INPUT_DEVICE, + settings.CENTER_POSITION_ON_MAP, + settings.ROTATE_MAP, + settings.MAP_SCREEN_ORIENTATION, + settings.LIVE_MONITORING_URL, + settings.LIVE_MONITORING_MAX_INTERVAL_TO_SEND, + settings.LIVE_MONITORING_INTERVAL, + settings.LIVE_MONITORING, + settings.SHOW_TRIP_REC_NOTIFICATION, + settings.AUTO_SPLIT_RECORDING, + settings.SAVE_TRACK_MIN_SPEED, + settings.SAVE_TRACK_PRECISION, + settings.SAVE_TRACK_MIN_DISTANCE, + settings.SAVE_TRACK_INTERVAL, + settings.TRACK_STORAGE_DIRECTORY, + settings.SAVE_HEADING_TO_GPX, + settings.DISABLE_RECORDING_ONCE_APP_KILLED, + settings.SAVE_TRACK_TO_GPX, + settings.SAVE_GLOBAL_TRACK_REMEMBER, + settings.SAVE_GLOBAL_TRACK_INTERVAL, + settings.MAP_EMPTY_STATE_ALLOWED, + settings.DO_NOT_USE_ANIMATIONS, + settings.USE_KALMAN_FILTER_FOR_COMPASS, + settings.USE_MAGNETIC_FIELD_SENSOR_COMPASS, + settings.USE_TRACKBALL_FOR_MOVEMENTS, + settings.SPEED_SYSTEM, + settings.ANGULAR_UNITS, + settings.METRIC_SYSTEM, + settings.DRIVING_REGION, + settings.DRIVING_REGION_AUTOMATIC + }; + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/DayNightHelper.java b/OsmAnd/src/net/osmand/plus/helpers/DayNightHelper.java index ea4f6a1ae7..d3ebe9d6ae 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/DayNightHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/DayNightHelper.java @@ -1,20 +1,6 @@ package net.osmand.plus.helpers; -import java.util.Date; -import java.util.List; -import java.util.TimeZone; - -import net.osmand.Location; -import net.osmand.PlatformUtil; -import net.osmand.StateChangedListener; -import net.osmand.plus.helpers.enums.DayNightMode; -import net.osmand.plus.settings.backend.ApplicationMode; -import net.osmand.plus.OsmandApplication; -import net.osmand.util.SunriseSunset; - -import org.apache.commons.logging.Log; - import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; @@ -22,6 +8,20 @@ import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.location.LocationManager; +import net.osmand.Location; +import net.osmand.PlatformUtil; +import net.osmand.StateChangedListener; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.helpers.enums.DayNightMode; +import net.osmand.plus.settings.backend.ApplicationMode; +import net.osmand.util.SunriseSunset; + +import org.apache.commons.logging.Log; + +import java.util.Date; +import java.util.List; +import java.util.TimeZone; + /** * Class to help determine if we want to render day or night map - it uses the * DayNightMode enumeration for its behavior
diff --git a/OsmAnd/src/net/osmand/plus/helpers/enums/AngularConstants.java b/OsmAnd/src/net/osmand/plus/helpers/enums/AngularConstants.java index 9962144fa4..4041380fe1 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/enums/AngularConstants.java +++ b/OsmAnd/src/net/osmand/plus/helpers/enums/AngularConstants.java @@ -24,5 +24,4 @@ public enum AngularConstants { public String getUnitSymbol() { return unit; } - -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/enums/AutoZoomMap.java b/OsmAnd/src/net/osmand/plus/helpers/enums/AutoZoomMap.java index f092c19be7..ad09424924 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/enums/AutoZoomMap.java +++ b/OsmAnd/src/net/osmand/plus/helpers/enums/AutoZoomMap.java @@ -6,6 +6,7 @@ public enum AutoZoomMap { FARTHEST(R.string.auto_zoom_farthest, 1f, 15.5f), FAR(R.string.auto_zoom_far, 1.4f, 17f), CLOSE(R.string.auto_zoom_close, 2f, 19f); + public final float coefficient; public final int name; public final float maxZoom; @@ -14,6 +15,5 @@ public enum AutoZoomMap { this.name = name; this.coefficient = coefficient; this.maxZoom = maxZoom; - } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/enums/DayNightMode.java b/OsmAnd/src/net/osmand/plus/helpers/enums/DayNightMode.java index 9c8865e877..77f0eb8876 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/enums/DayNightMode.java +++ b/OsmAnd/src/net/osmand/plus/helpers/enums/DayNightMode.java @@ -59,4 +59,4 @@ public enum DayNightMode { return new DayNightMode[]{AUTO, DAY, NIGHT}; } } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/enums/DrivingRegion.java b/OsmAnd/src/net/osmand/plus/helpers/enums/DrivingRegion.java index 70c825926e..60902c46b5 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/enums/DrivingRegion.java +++ b/OsmAnd/src/net/osmand/plus/helpers/enums/DrivingRegion.java @@ -54,9 +54,9 @@ public enum DrivingRegion { return DrivingRegion.JAPAN; } else if (df.getCountry().equalsIgnoreCase("au")) { return DrivingRegion.AUSTRALIA; - } else if(df.getCountry().equalsIgnoreCase(Locale.UK.getCountry())) { + } else if (df.getCountry().equalsIgnoreCase(Locale.UK.getCountry())) { return DrivingRegion.UK_AND_OTHERS; } return DrivingRegion.EUROPE_ASIA; } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/enums/MetricsConstants.java b/OsmAnd/src/net/osmand/plus/helpers/enums/MetricsConstants.java index 23034b5277..20f3804a6a 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/enums/MetricsConstants.java +++ b/OsmAnd/src/net/osmand/plus/helpers/enums/MetricsConstants.java @@ -26,5 +26,4 @@ public enum MetricsConstants { public String toTTSString() { return ttsString; } - -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/helpers/enums/SpeedConstants.java b/OsmAnd/src/net/osmand/plus/helpers/enums/SpeedConstants.java index 15a54513eb..1a4c512b8c 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/enums/SpeedConstants.java +++ b/OsmAnd/src/net/osmand/plus/helpers/enums/SpeedConstants.java @@ -29,5 +29,4 @@ public enum SpeedConstants { public String toShortString(Context ctx) { return ctx.getString(key); } - -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersMode.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersMode.java index 840da1ad92..a9cf23ea75 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersMode.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersMode.java @@ -34,4 +34,4 @@ public enum MapMarkersMode { public static MapMarkersMode[] possibleValues(Context context) { return new MapMarkersMode[]{TOOLBAR, WIDGETS, NONE}; } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/BooleanPreference.java b/OsmAnd/src/net/osmand/plus/settings/backend/BooleanPreference.java index 9a0c2a2391..9ff4d3069d 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/BooleanPreference.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/BooleanPreference.java @@ -2,12 +2,12 @@ package net.osmand.plus.settings.backend; public class BooleanPreference extends CommonPreference { - BooleanPreference(OsmandSettings osmandSettings, String id, boolean defaultValue) { - super(osmandSettings, id, defaultValue); + BooleanPreference(OsmandSettings settings, String id, boolean defaultValue) { + super(settings, id, defaultValue); } @Override - public Boolean getValue(Object prefs, Boolean defaultValue) { + protected Boolean getValue(Object prefs, Boolean defaultValue) { return getSettingsAPI().getBoolean(prefs, getId(), defaultValue); } @@ -20,4 +20,4 @@ public class BooleanPreference extends CommonPreference { public Boolean parseString(String s) { return Boolean.parseBoolean(s); } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/BooleanStringPreference.java b/OsmAnd/src/net/osmand/plus/settings/backend/BooleanStringPreference.java index 8ca99f8521..1928fa60a7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/BooleanStringPreference.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/BooleanStringPreference.java @@ -7,7 +7,7 @@ public class BooleanStringPreference extends BooleanPreference { } @Override - public Boolean getValue(Object prefs, Boolean defaultValue) { + protected Boolean getValue(Object prefs, Boolean defaultValue) { Boolean value; try { value = parseString(getSettingsAPI().getString(prefs, getId(), defaultValue.toString())); @@ -22,4 +22,4 @@ public class BooleanStringPreference extends BooleanPreference { protected boolean setValue(Object prefs, Boolean val) { return getSettingsAPI().edit(prefs).putString(getId(), val != null ? val.toString() : null).commit(); } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/CommonPreference.java b/OsmAnd/src/net/osmand/plus/settings/backend/CommonPreference.java index ea1c251375..62ce3a2450 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/CommonPreference.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/CommonPreference.java @@ -10,25 +10,29 @@ import java.util.LinkedHashMap; import java.util.Map; public abstract class CommonPreference extends PreferenceWithListener { - private OsmandSettings osmandSettings; - private final String id; - private boolean global; - private T cachedValue; + + private OsmandSettings settings; private Object cachedPreference; - private boolean cache; - private Map defaultValues; + + private final String id; + + private T cachedValue; private T defaultValue; + private Map defaultValues; + + private boolean cache; + private boolean global; - public CommonPreference(OsmandSettings osmandSettings, String id, T defaultValue) { - this.osmandSettings = osmandSettings; + public CommonPreference(OsmandSettings settings, String id, T defaultValue) { + this.settings = settings; this.id = id; this.defaultValue = defaultValue; - osmandSettings.registerInternalPreference(id, this); + settings.registerInternalPreference(id, this); } // Methods to possibly override - public abstract T getValue(Object prefs, T defaultValue); + protected abstract T getValue(Object prefs, T defaultValue); protected abstract boolean setValue(Object prefs, T val); @@ -39,15 +43,15 @@ public abstract class CommonPreference extends PreferenceWithListener { } protected SettingsAPI getSettingsAPI() { - return osmandSettings.getSettingsAPI(); + return settings.getSettingsAPI(); } protected ApplicationMode getApplicationMode() { - return osmandSettings.getApplicationMode(); + return settings.getApplicationMode(); } protected OsmandApplication getContext() { - return osmandSettings.getContext(); + return settings.getContext(); } // common methods @@ -68,7 +72,7 @@ public abstract class CommonPreference extends PreferenceWithListener { } protected final Object getPreferences() { - return osmandSettings.getPreferences(global); + return settings.getPreferences(global); } @@ -86,7 +90,7 @@ public abstract class CommonPreference extends PreferenceWithListener { return set(obj); } - Object profilePrefs = osmandSettings.getProfilePreferences(mode); + Object profilePrefs = settings.getProfilePreferences(mode); boolean valueSaved = setValue(profilePrefs, obj); if (valueSaved && cache && cachedPreference == profilePrefs) { cachedValue = obj; @@ -121,7 +125,7 @@ public abstract class CommonPreference extends PreferenceWithListener { // TODO final protected T getDefaultValue() { - return getProfileDefaultValue(osmandSettings.currentMode); + return getProfileDefaultValue(settings.APPLICATION_MODE.get()); } @Override @@ -129,8 +133,6 @@ public abstract class CommonPreference extends PreferenceWithListener { this.defaultValue = newDefaultValue; } - - // TODO final @Override public T getModeValue(ApplicationMode mode) { @@ -138,7 +140,7 @@ public abstract class CommonPreference extends PreferenceWithListener { return get(); } T defaultV = getProfileDefaultValue(mode); - return getValue(osmandSettings.getProfilePreferences(mode), defaultV); + return getValue(settings.getProfilePreferences(mode), defaultV); } // TODO final @@ -148,7 +150,7 @@ public abstract class CommonPreference extends PreferenceWithListener { return cachedValue; } cachedPreference = getPreferences(); - cachedValue = getValue(cachedPreference, getProfileDefaultValue(osmandSettings.currentMode)); + cachedValue = getValue(cachedPreference, getProfileDefaultValue(settings.APPLICATION_MODE.get())); return cachedValue; } @@ -159,7 +161,7 @@ public abstract class CommonPreference extends PreferenceWithListener { @Override public final void resetToDefault() { - T o = getProfileDefaultValue(osmandSettings.currentMode); + T o = getProfileDefaultValue(settings.APPLICATION_MODE.get()); set(o); } @@ -186,12 +188,12 @@ public abstract class CommonPreference extends PreferenceWithListener { return false; } - public final boolean isSet() { - return osmandSettings.isSet(global, getId()); + public final boolean isSet() { + return settings.isSet(global, getId()); } public boolean isSetForMode(ApplicationMode mode) { - return osmandSettings.isSet(mode, getId()); + return settings.isSet(mode, getId()); } public final boolean isGlobal() { @@ -218,6 +220,7 @@ public abstract class CommonPreference extends PreferenceWithListener { } return false; } + // TODO final @Override public void readFromJson(JSONObject json, ApplicationMode appMode) throws JSONException { @@ -243,4 +246,4 @@ public abstract class CommonPreference extends PreferenceWithListener { T v = getModeValue(m); return toString(v); } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/ContextMenuItemsPreference.java b/OsmAnd/src/net/osmand/plus/settings/backend/ContextMenuItemsPreference.java index 4e562f1aca..12a83ea229 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/ContextMenuItemsPreference.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/ContextMenuItemsPreference.java @@ -6,13 +6,13 @@ public class ContextMenuItemsPreference extends CommonPreference