diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java index 7d0d3b90e2..3d6422991e 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java @@ -195,6 +195,10 @@ public class EditPOIMenuController extends MenuController { } private String getCategory() { - return OsmEditingPlugin.getCategory(osmPoint, getMapActivity()); + String category = ((OpenstreetmapPoint) osmPoint).getEntity().getTag(EditPoiData.POI_TYPE_TAG); + if (Algorithms.isEmpty(category)) { + category = getMapActivity().getString(R.string.shared_string_without_name); + } + return category; } } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 4c63bcb5cf..7c3aa390ab 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -445,19 +445,6 @@ public class OsmEditingPlugin extends OsmandPlugin { } } - public static String getCategory(OsmPoint osmPoint, Context context) { - String category = ""; - if (osmPoint.getGroup() == OsmPoint.Group.POI) { - category = ((OpenstreetmapPoint) osmPoint).getEntity().getTag(EditPoiData.POI_TYPE_TAG); - if (Algorithms.isEmpty(category)) { - category = context.getString(R.string.shared_string_without_name); - } - } else if (osmPoint.getGroup() == OsmPoint.Group.BUG) { - category = context.getString(R.string.osn_bug_name); - } - return category; - } - public static String getPrefix(OsmPoint osmPoint) { return (osmPoint.getGroup() == OsmPoint.Group.POI ? "POI" : "Bug") + " id: " + osmPoint.getId() + " "; } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java index 450a9ce993..a2318d9ede 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsAdapter.java @@ -300,8 +300,17 @@ public class OsmEditsAdapter extends ArrayAdapter { return true; } - private String getCategory(OsmPoint point) { - return OsmEditingPlugin.getCategory(point, getContext()); + private String getCategory(OsmPoint osmPoint) { + String category = ""; + if (osmPoint.getGroup() == OsmPoint.Group.POI) { + category = ((OpenstreetmapPoint) osmPoint).getEntity().getTag(EditPoiData.POI_TYPE_TAG); + if (Algorithms.isEmpty(category)) { + category = getContext().getString(R.string.shared_string_without_name); + } + } else if (osmPoint.getGroup() == OsmPoint.Group.BUG) { + category = getContext().getString(R.string.osn_bug_name); + } + return category; } private String getDescription(OsmPoint point) {