From c46cbff58f70e2cd7f88bf4fdf6ff78c67cb28a8 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 6 May 2016 19:59:15 +0200 Subject: [PATCH] Clean up old methods' --- .../plus/audionotes/AudioNotesLayer.java | 7 ------ .../DistanceCalculatorPlugin.java | 24 ------------------- .../net/osmand/plus/osmedit/OsmBugsLayer.java | 7 ------ .../osmand/plus/osmedit/OsmEditsLayer.java | 8 ------- .../osmand/plus/osmo/OsMoPositionLayer.java | 14 ----------- .../parkingpoint/ParkingPositionLayer.java | 5 ---- .../RoutePointsLayer.java | 5 ---- .../plus/views/DownloadedRegionsLayer.java | 5 ---- .../src/net/osmand/plus/views/GPXLayer.java | 8 ------- .../plus/views/ImpassableRoadsLayer.java | 5 ---- .../osmand/plus/views/MapMarkersLayer.java | 7 ------ .../net/osmand/plus/views/POIMapLayer.java | 8 ------- .../osmand/plus/views/PointLocationLayer.java | 4 ---- .../plus/views/PointNavigationLayer.java | 7 ------ .../plus/views/TransportStopsLayer.java | 8 ------- 15 files changed, 122 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java index e434e1aff7..7c8051bb7d 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java @@ -130,13 +130,6 @@ public class AudioNotesLayer extends OsmandMapLayer implements IContextMenuProvi return true; } - @Override - public String getObjectDescription(Object o) { - if(o instanceof Recording){ - return ((Recording)o).getDescription(view.getContext()); - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java index 51ef387f54..73728bdadb 100644 --- a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java +++ b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java @@ -681,30 +681,6 @@ public class DistanceCalculatorPlugin extends OsmandPlugin { } } - @Override - public String getObjectDescription(Object o) { - if(o instanceof WptPt) { - PointDescription desc = getObjectName(o); - List l = new ArrayList(); - if(!Double.isNaN(((WptPt) o).ele)) { - l.add(app.getString(R.string.plugin_distance_point_ele) + " "+ OsmAndFormatter.getFormattedDistance((float) ((WptPt) o).ele, app)); - } - if(!Double.isNaN(((WptPt) o).speed)) { - l.add(app.getString(R.string.plugin_distance_point_speed) + " "+ OsmAndFormatter.getFormattedSpeed((float) ((WptPt) o).speed, app)); - } - if(!Double.isNaN(((WptPt) o).hdop)) { - l.add(app.getString(R.string.plugin_distance_point_hdop) + " "+ OsmAndFormatter.getFormattedDistance((float) ((WptPt) o).hdop, app)); - } - if(((WptPt) o).time != 0) { - Date date = new Date(((WptPt) o).time); - java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(app); - java.text.DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(app); - l.add(app.getString(R.string.plugin_distance_point_time) + " "+ dateFormat.format(date) + " " + timeFormat.format(date)); - } - return desc.getName() + " " + l; - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java index f5cc868b60..b3f5b70b0e 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java @@ -456,13 +456,6 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider } - @Override - public String getObjectDescription(Object o) { - if (o instanceof OpenStreetNote) { - return activity.getString(R.string.osn_bug_name) + ": " + ((OpenStreetNote) o).getCommentDescription(); //$NON-NLS-1$ - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java index de1048e3c2..b306213d30 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java @@ -157,14 +157,6 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC return null; } - @Override - public String getObjectDescription(Object o) { - if(o instanceof OsmPoint) { - OsmPoint point = (OsmPoint) o; - return OsmEditingPlugin.getEditName(point); - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPositionLayer.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPositionLayer.java index 1aa504760c..6e6209ce11 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPositionLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPositionLayer.java @@ -228,20 +228,6 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye return null; } - @Override - public String getObjectDescription(Object o) { - if (o instanceof OsMoDevice) { - String d = map.getString(R.string.osmo_user_name) + " " + ((OsMoDevice) o).getVisibleName(); - final Location l = ((OsMoDevice) o).getLastLocation(); - float speed = 0; - if(l != null && l.hasSpeed()) { - speed = l.getSpeed(); - } - d += "\n"+ OsmAndFormatter.getFormattedSpeed(speed, map.getMyApplication()); - return d; - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java index 1e6e59ebea..3c9fde5f2c 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java @@ -131,11 +131,6 @@ public class ParkingPositionLayer extends OsmandMapLayer implements ContextMenuL return null; } - @Override - public String getObjectDescription(Object o) { - return plugin.getParkingDescription(map); - - } public String getFormattedTime(long time){ return plugin.getFormattedTime(time, map); diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java index b988aea501..f171815e89 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java @@ -52,11 +52,6 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye return null; } - @Override - public String getObjectDescription(Object o) { - return null; - } - @Override public PointDescription getObjectName(Object o) { return null; diff --git a/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java b/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java index 3f3f763fe0..566efe7acb 100644 --- a/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/DownloadedRegionsLayer.java @@ -430,11 +430,6 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe return null; } - @Override - public String getObjectDescription(Object o) { - return view.getContext().getString(R.string.shared_string_map); - } - @Override public PointDescription getObjectName(Object o) { if (o instanceof DownloadMapObject) { diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 8945888862..28efbce2e4 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -389,14 +389,6 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex } } - @Override - public String getObjectDescription(Object o) { - if(o instanceof WptPt){ - return view.getContext().getString(R.string.gpx_wpt) + " : " + ((WptPt)o).name; //$NON-NLS-1$ - } - return null; - } - @Override public PointDescription getObjectName(Object o) { if(o instanceof WptPt){ diff --git a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java index 00e8a7f148..48588a25b2 100644 --- a/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ImpassableRoadsLayer.java @@ -145,11 +145,6 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements ContextMenuL return null; } - @Override - public String getObjectDescription(Object o) { - return null; - } - @Override public PointDescription getObjectName(Object o) { if (o instanceof RouteDataObject) { diff --git a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java index e295359e90..944b60ef89 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java @@ -449,13 +449,6 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi return null; } - @Override - public String getObjectDescription(Object o) { - if (o instanceof MapMarker) { - return ((MapMarker) o).getPointDescription(view.getContext()).getFullPlainName(view.getContext()); - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 08b3a894b0..1ef668a8f8 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -475,14 +475,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon } - @Override - public String getObjectDescription(Object o) { - if (o instanceof Amenity) { - return buildPoiInformation(new StringBuilder(), (Amenity) o).toString(); - } - return null; - } - @Override public PointDescription getObjectName(Object o) { if (o instanceof Amenity) { diff --git a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java index f7073f0790..808fff7524 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java @@ -174,10 +174,6 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay return getMyLocation(); } - @Override - public String getObjectDescription(Object o) { - return view.getResources().getString(R.string.shared_string_my_location); - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java index c50e3e6f3f..bcf6389d03 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java @@ -226,13 +226,6 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu return null; } - @Override - public String getObjectDescription(Object o) { - if (o instanceof TargetPoint) { - return ((TargetPoint) o).getPointDescription(view.getContext()).getFullPlainName(view.getContext()); - } - return null; - } @Override public PointDescription getObjectName(Object o) { diff --git a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java index 00fe59c88d..e8d6051790 100644 --- a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java @@ -170,14 +170,6 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa return false; } - @Override - public String getObjectDescription(Object o) { - if(o instanceof TransportStop){ - return getStopDescription((TransportStop) o, false); - } - return null; - } - @Override public PointDescription getObjectName(Object o) { if(o instanceof TransportStop){