Clean up old methods'

This commit is contained in:
Victor Shcherb 2016-05-06 19:59:15 +02:00
parent 6c5a940c06
commit c46cbff58f
15 changed files with 0 additions and 122 deletions

View file

@ -130,13 +130,6 @@ public class AudioNotesLayer extends OsmandMapLayer implements IContextMenuProvi
return true; return true;
} }
@Override
public String getObjectDescription(Object o) {
if(o instanceof Recording){
return ((Recording)o).getDescription(view.getContext());
}
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -681,30 +681,6 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
} }
} }
@Override
public String getObjectDescription(Object o) {
if(o instanceof WptPt) {
PointDescription desc = getObjectName(o);
List<String> l = new ArrayList<String>();
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 @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -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 @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -157,14 +157,6 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
if(o instanceof OsmPoint) {
OsmPoint point = (OsmPoint) o;
return OsmEditingPlugin.getEditName(point);
}
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -228,20 +228,6 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
return null; 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 @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -131,11 +131,6 @@ public class ParkingPositionLayer extends OsmandMapLayer implements ContextMenuL
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
return plugin.getParkingDescription(map);
}
public String getFormattedTime(long time){ public String getFormattedTime(long time){
return plugin.getFormattedTime(time, map); return plugin.getFormattedTime(time, map);

View file

@ -52,11 +52,6 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {
return null; return null;

View file

@ -430,11 +430,6 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
return view.getContext().getString(R.string.shared_string_map);
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {
if (o instanceof DownloadMapObject) { if (o instanceof DownloadMapObject) {

View file

@ -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 @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {
if(o instanceof WptPt){ if(o instanceof WptPt){

View file

@ -145,11 +145,6 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements ContextMenuL
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {
if (o instanceof RouteDataObject) { if (o instanceof RouteDataObject) {

View file

@ -449,13 +449,6 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
if (o instanceof MapMarker) {
return ((MapMarker) o).getPointDescription(view.getContext()).getFullPlainName(view.getContext());
}
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -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 @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {
if (o instanceof Amenity) { if (o instanceof Amenity) {

View file

@ -174,10 +174,6 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
return getMyLocation(); return getMyLocation();
} }
@Override
public String getObjectDescription(Object o) {
return view.getResources().getString(R.string.shared_string_my_location);
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -226,13 +226,6 @@ public class PointNavigationLayer extends OsmandMapLayer implements IContextMenu
return null; return null;
} }
@Override
public String getObjectDescription(Object o) {
if (o instanceof TargetPoint) {
return ((TargetPoint) o).getPointDescription(view.getContext()).getFullPlainName(view.getContext());
}
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {

View file

@ -170,14 +170,6 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
return false; return false;
} }
@Override
public String getObjectDescription(Object o) {
if(o instanceof TransportStop){
return getStopDescription((TransportStop) o, false);
}
return null;
}
@Override @Override
public PointDescription getObjectName(Object o) { public PointDescription getObjectName(Object o) {
if(o instanceof TransportStop){ if(o instanceof TransportStop){