From a668a0358765ea2b45c1a05d8b95349e492f8d7f Mon Sep 17 00:00:00 2001 From: rsudev Date: Tue, 19 Jun 2012 21:08:41 +0200 Subject: Fix #374, store last known location Store map center on leave (for all maps) and use it if no reliable location comes in through the GeoProvider --- main/src/cgeo/geocaching/GeoDataProvider.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'main/src/cgeo/geocaching/GeoDataProvider.java') diff --git a/main/src/cgeo/geocaching/GeoDataProvider.java b/main/src/cgeo/geocaching/GeoDataProvider.java index 58b0696..441c871 100644 --- a/main/src/cgeo/geocaching/GeoDataProvider.java +++ b/main/src/cgeo/geocaching/GeoDataProvider.java @@ -6,6 +6,8 @@ import cgeo.geocaching.go4cache.Go4Cache; import cgeo.geocaching.utils.Log; import cgeo.geocaching.utils.MemorySubject; +import org.apache.commons.lang3.StringUtils; + import android.content.Context; import android.location.GpsSatellite; import android.location.GpsStatus; @@ -103,6 +105,11 @@ class GeoDataProvider extends MemorySubject { public int getSatellitesFixed() { return satellitesFixed; } + + @Override + public boolean isPseudoLocation() { + return StringUtils.equals(getProvider(), GeoDataProvider.LAST_LOCATION_PSEUDO_PROVIDER); + } } private class Unregisterer extends Thread { -- cgit v1.1