--- android/TrainInfo/src/dk/thoerup/traininfo/LocationLookup.java 2010/12/25 20:51:29 1207 +++ android/TrainInfo/src/dk/thoerup/traininfo/LocationLookup.java 2010/12/25 21:22:44 1208 @@ -24,7 +24,6 @@ private LocationManager locManager; private Context cntx; - private Location lastKnownLocation = null; private Location savedLocation = null; private int satCount; @@ -61,9 +60,6 @@ return state; } - public Location getLastKnownLocation() { - return lastKnownLocation; - } public long elapsedTime() { long now = android.os.SystemClock.elapsedRealtime(); @@ -92,10 +88,6 @@ } locManager.requestLocationUpdates(provider, 0, 0, this); - Location tmpLastKnown = locManager.getLastKnownLocation(provider); - if (tmpLastKnown != null) { - saveLastKnownLocation(tmpLastKnown); - } } } else { // message that no suitable provider was found @@ -125,15 +117,6 @@ } - private void saveLastKnownLocation(Location loc) { - if (lastKnownLocation == null) { - lastKnownLocation = loc; - } else { - if (loc.getTime() > lastKnownLocation.getTime()) {//if loc is more recent than saved - lastKnownLocation = loc; - } - } - } public void stopSearch() {