diff options
Diffstat (limited to 'main/src/cgeo/geocaching/apps/AbstractLocusApp.java')
| -rw-r--r-- | main/src/cgeo/geocaching/apps/AbstractLocusApp.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java index ac6fc1c..ad421f6 100644 --- a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java +++ b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java @@ -2,7 +2,7 @@ package cgeo.geocaching.apps; import cgeo.geocaching.R; import cgeo.geocaching.cgCache; -import cgeo.geocaching.cgWaypoint; +import cgeo.geocaching.Waypoint; import cgeo.geocaching.cgeoapplication; import cgeo.geocaching.enumerations.CacheSize; import cgeo.geocaching.enumerations.CacheType; @@ -22,6 +22,7 @@ import android.location.Location; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; +import java.util.Locale; /** * for the Locus API: @@ -30,7 +31,7 @@ import java.util.List; */ public abstract class AbstractLocusApp extends AbstractApp { private static final String INTENT = Intent.ACTION_VIEW; - private static final SimpleDateFormat ISO8601DATE = new SimpleDateFormat("yyyy-MM-dd'T'"); + private static final SimpleDateFormat ISO8601DATE = new SimpleDateFormat("yyyy-MM-dd'T'", Locale.US); protected AbstractLocusApp() { super(getString(R.string.caches_map_locus), INTENT); @@ -47,11 +48,11 @@ public abstract class AbstractLocusApp extends AbstractApp { /** * Display a list of caches / waypoints in Locus - * + * * @param objectsToShow * which caches/waypoints to show * @param withCacheWaypoints - * wether to give waypoints of caches to Locus or not + * Whether to give waypoints of caches to Locus or not * @param activity */ protected static boolean showInLocus(final List<?> objectsToShow, final boolean withCacheWaypoints, final boolean export, @@ -67,8 +68,8 @@ public abstract class AbstractLocusApp extends AbstractApp { // get icon and Point if (o instanceof cgCache) { p = getCachePoint((cgCache) o, withCacheWaypoints, withCacheDetails); - } else if (o instanceof cgWaypoint) { - p = getWaypointPoint((cgWaypoint) o); + } else if (o instanceof Waypoint) { + p = getWaypointPoint((Waypoint) o); } if (p != null) { pd.addPoint(p); @@ -85,7 +86,7 @@ public abstract class AbstractLocusApp extends AbstractApp { final ArrayList<PointsData> data = new ArrayList<PointsData>(); data.add(pd); DisplayData.sendDataCursor(activity, data, - "content://" + LocusDataStorageProvider.class.getCanonicalName().toLowerCase(), + "content://" + LocusDataStorageProvider.class.getCanonicalName().toLowerCase(Locale.US), export); } @@ -145,7 +146,7 @@ public abstract class AbstractLocusApp extends AbstractApp { if (withWaypoints && cache.hasWaypoints()) { pg.waypoints = new ArrayList<PointGeocachingDataWaypoint>(); - for (cgWaypoint waypoint : cache.getWaypoints()) { + for (Waypoint waypoint : cache.getWaypoints()) { if (waypoint == null || waypoint.getCoords() == null) { continue; } @@ -181,7 +182,7 @@ public abstract class AbstractLocusApp extends AbstractApp { * @param waypoint * @return null, when the <code>Point</code> could not be constructed */ - private static Point getWaypointPoint(cgWaypoint waypoint) { + private static Point getWaypointPoint(Waypoint waypoint) { if (waypoint == null || waypoint.getCoords() == null) { return null; } |
