From 9f3d00eeb2c4ba4faf779032a04a20e02ff88c98 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 28 Oct 2020 03:46:58 +0200 Subject: [PATCH] Fix merge conflict --- OsmAnd/src/net/osmand/AndroidUtils.java | 5 +++++ .../plus/mapcontextmenu/editors/PointEditorFragmentNew.java | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/AndroidUtils.java b/OsmAnd/src/net/osmand/AndroidUtils.java index 23d4e5fbd1..40ea9cfb98 100644 --- a/OsmAnd/src/net/osmand/AndroidUtils.java +++ b/OsmAnd/src/net/osmand/AndroidUtils.java @@ -906,6 +906,11 @@ public class AndroidUtils { return value != null ? value : defValue; } + public static String getIconStringPropertyName(Context ctx, String propertyName) { + String value = getStringByProperty(ctx, "icon_group_" + propertyName); + return value != null ? value : propertyName; + } + public static String getRenderingStringPropertyValue(Context ctx, String propertyValue) { if (propertyValue == null) { return ""; diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java index 474c0e7870..e8adf8e088 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java @@ -47,7 +47,6 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.activities.SettingsBaseActivity; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.ColorDialogs; @@ -595,9 +594,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment { JSONObject categories = obj.getJSONObject("categories"); for (int i = 0; i < categories.length(); i++) { JSONArray names = categories.names(); - JSONObject icons = categories.getJSONObject(names.get(i).toString()); String name = names.get(i).toString(); - String translatedName = SettingsBaseActivity.getIconStringPropertyName(app, name, name); + JSONObject icons = categories.getJSONObject(name); + String translatedName = AndroidUtils.getIconStringPropertyName(app, name); iconCategories.put(translatedName, icons.getJSONArray("icons")); } } catch (JSONException e) {