aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/apps/AbstractLocusApp.java')
-rw-r--r--main/src/cgeo/geocaching/apps/AbstractLocusApp.java27
1 files changed, 14 insertions, 13 deletions
diff --git a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
index ac6fc1c..53620e4 100644
--- a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
+++ b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
@@ -1,8 +1,8 @@
package cgeo.geocaching.apps;
+import cgeo.geocaching.Geocache;
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,
@@ -65,10 +66,10 @@ public abstract class AbstractLocusApp extends AbstractApp {
for (Object o : objectsToShow) {
Point p = null;
// get icon and Point
- if (o instanceof cgCache) {
- p = getCachePoint((cgCache) o, withCacheWaypoints, withCacheDetails);
- } else if (o instanceof cgWaypoint) {
- p = getWaypointPoint((cgWaypoint) o);
+ if (o instanceof Geocache) {
+ p = getCachePoint((Geocache) o, withCacheWaypoints, withCacheDetails);
+ } 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);
}
@@ -103,7 +104,7 @@ public abstract class AbstractLocusApp extends AbstractApp {
* should be false for all if more then 200 Caches are transferred
* @return null, when the <code>Point</code> could not be constructed
*/
- private static Point getCachePoint(cgCache cache, boolean withWaypoints, boolean withCacheDetails) {
+ private static Point getCachePoint(Geocache cache, boolean withWaypoints, boolean withCacheDetails) {
if (cache == null || cache.getCoords() == null) {
return null;
}
@@ -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;
}