diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-09-15 11:41:37 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-09-15 11:42:47 +0200 |
| commit | dfad93c9b7260e45d97dcb15c906b6a1df024372 (patch) | |
| tree | 855ab6da62c2d79b871f69a6e856e7b22ccf1c9c /main | |
| parent | 7f2e2b1df5ce233bc20217d38d22a5a9c4d60996 (diff) | |
| download | cgeo-dfad93c9b7260e45d97dcb15c906b6a1df024372.zip cgeo-dfad93c9b7260e45d97dcb15c906b6a1df024372.tar.gz cgeo-dfad93c9b7260e45d97dcb15c906b6a1df024372.tar.bz2 | |
Remove arbitrary inter-caches delay
Diffstat (limited to 'main')
| -rw-r--r-- | main/src/cgeo/geocaching/CacheListActivity.java | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java index 0f44f86..e3f79e5 100644 --- a/main/src/cgeo/geocaching/CacheListActivity.java +++ b/main/src/cgeo/geocaching/CacheListActivity.java @@ -1202,7 +1202,6 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA final private Handler handler; final private int listIdLD; private volatile boolean needToStop = false; - private long last = 0L; final private List<Geocache> caches; public LoadDetailsThread(Handler handlerIn, List<Geocache> caches, int listId) { @@ -1257,30 +1256,9 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA if (needToStop) { throw new InterruptedException("Stopped storing process."); } - - if ((System.currentTimeMillis() - last) < 1500) { - try { - int delay = 1000 + ((Double) (Math.random() * 1000)).intValue() - (int) (System.currentTimeMillis() - last); - if (delay < 0) { - delay = 500; - } - - Log.i("Waiting for next cache " + delay + " ms"); - } catch (final Exception e) { - Log.e("CacheListActivity.LoadDetailsThread.sleep", e); - } - } - - if (needToStop) { - throw new InterruptedException("Stopped storing process."); - } - detailProgress++; cache.refresh(listIdLD, null); - handler.sendEmptyMessage(cacheList.indexOf(cache)); - - yield(); } catch (final InterruptedException e) { Log.i(e.getMessage()); return false; @@ -1288,7 +1266,6 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA Log.e("CacheListActivity.LoadDetailsThread", e); } - last = System.currentTimeMillis(); return true; } } |
