aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/CacheListActivity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java
index 6b639e4..b2404d9 100644
--- a/main/src/cgeo/geocaching/CacheListActivity.java
+++ b/main/src/cgeo/geocaching/CacheListActivity.java
@@ -1179,11 +1179,11 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
@Override
public void run() {
- final long startTime = System.currentTimeMillis();
+ long baseTime = System.currentTimeMillis();
final String deviceCode = StringUtils.defaultString(Settings.getWebDeviceCode());
final Parameters params = new Parameters("code", deviceCode);
- while (!handler.isCancelled() && System.currentTimeMillis() - startTime < 3 * 60000) { // maximum: 3 minutes
+ while (!handler.isCancelled() && System.currentTimeMillis() - baseTime < 3 * 60000) { // maximum: 3 minutes
// Download new code
final HttpResponse responseFromWeb = Network.getRequest("http://send2.cgeo.org/read.html", params);
@@ -1195,6 +1195,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
Geocache.storeCache(null, response, listIdLFW, false, null);
handler.sendMessage(handler.obtainMessage(MSG_LOADED, response));
+ baseTime = System.currentTimeMillis();
} else if ("RG".equals(response)) {
//Server returned RG (registration) and this device no longer registered.
Settings.setWebNameCode(null, null);