aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2013-10-03 20:53:37 +0200
committerBananeweizen <Bananeweizen@gmx.de>2013-10-03 20:53:37 +0200
commitcd49d2cc2b66400222bd94a303bc873afd4c17f0 (patch)
tree62b42279c0d6a6ec4abc2c64b2eb43cd116d73e9 /main/src
parentda213b6ecfb952a35e261e9f4a02b2e7c4e113f4 (diff)
downloadcgeo-cd49d2cc2b66400222bd94a303bc873afd4c17f0.zip
cgeo-cd49d2cc2b66400222bd94a303bc873afd4c17f0.tar.gz
cgeo-cd49d2cc2b66400222bd94a303bc873afd4c17f0.tar.bz2
refactoring: remove pause in download from maps
* the same pause has been removed for batch storing from cache lists some time ago
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java26
1 files changed, 2 insertions, 24 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index a32a669..0c62e65 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1,14 +1,14 @@
package cgeo.geocaching.maps;
+import cgeo.geocaching.CacheListActivity;
import cgeo.geocaching.CgeoApplication;
+import cgeo.geocaching.DataStore;
import cgeo.geocaching.DirectionProvider;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.IGeoData;
import cgeo.geocaching.R;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.Waypoint;
-import cgeo.geocaching.DataStore;
-import cgeo.geocaching.CacheListActivity;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.gc.Login;
@@ -1383,7 +1383,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
final private CancellableHandler handler;
final private List<String> geocodes;
final private int listId;
- private long last = 0L;
public LoadDetails(final CancellableHandler handler, final List<String> geocodes, final int listId) {
this.handler = handler;
@@ -1410,25 +1409,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
if (!DataStore.isOffline(geocode, null)) {
- if ((System.currentTimeMillis() - last) < 1500) {
- try {
- int delay = 1000 + (int) (Math.random() * 1000.0) - (int) (System.currentTimeMillis() - last);
- if (delay < 0) {
- delay = 500;
- }
-
- sleep(delay);
- } catch (InterruptedException e) {
- // nothing
- }
- }
-
- if (handler.isCancelled()) {
- Log.i("Stopped storing process.");
-
- break;
- }
-
Geocache.storeCache(null, geocode, listId, false, handler);
}
} catch (Exception e) {
@@ -1441,8 +1421,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
// FIXME: what does this yield() do here?
yield();
-
- last = System.currentTimeMillis();
}
// we're done