aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/sensors/GeoData.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/sensors/GeoData.java b/main/src/cgeo/geocaching/sensors/GeoData.java
index c0618a5..a52eb55 100644
--- a/main/src/cgeo/geocaching/sensors/GeoData.java
+++ b/main/src/cgeo/geocaching/sensors/GeoData.java
@@ -32,7 +32,7 @@ public class GeoData extends Location {
@Nullable
static Location best(@Nullable final Location gpsLocation, @Nullable final Location netLocation) {
- if (isRecent(gpsLocation) || netLocation == null) {
+ if (netLocation == null || (gpsLocation != null && System.currentTimeMillis() <= gpsLocation.getTime() + 30000)) {
return gpsLocation;
}
if (gpsLocation == null) {
@@ -93,8 +93,4 @@ public class GeoData extends Location {
}
}
- public static boolean isRecent(@Nullable final Location location) {
- return location != null && System.currentTimeMillis() <= location.getTime() + 30000;
- }
-
} \ No newline at end of file