diff options
Diffstat (limited to 'main/src/cgeo/geocaching/maps/CachesOverlay.java')
| -rw-r--r-- | main/src/cgeo/geocaching/maps/CachesOverlay.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/maps/CachesOverlay.java b/main/src/cgeo/geocaching/maps/CachesOverlay.java index b656900..fe1a19b 100644 --- a/main/src/cgeo/geocaching/maps/CachesOverlay.java +++ b/main/src/cgeo/geocaching/maps/CachesOverlay.java @@ -6,7 +6,7 @@ import cgeo.geocaching.R; import cgeo.geocaching.Settings; import cgeo.geocaching.WaypointPopup; import cgeo.geocaching.cgCache; -import cgeo.geocaching.cgeoapplication; +import cgeo.geocaching.cgData; import cgeo.geocaching.activity.Progress; import cgeo.geocaching.connector.gc.GCMap; import cgeo.geocaching.enumerations.CacheType; @@ -209,10 +209,9 @@ public class CachesOverlay extends AbstractItemizedOverlay { progress.show(context, context.getResources().getString(R.string.map_live), context.getResources().getString(R.string.cache_dialog_loading_details), true, null); - CachesOverlayItemImpl item = null; - // prevent concurrent changes getOverlayImpl().lock(); + CachesOverlayItemImpl item = null; try { if (index < items.size()) { item = items.get(index); @@ -228,7 +227,7 @@ public class CachesOverlay extends AbstractItemizedOverlay { final IWaypoint coordinate = item.getCoord(); if (StringUtils.isNotBlank(coordinate.getCoordType()) && coordinate.getCoordType().equalsIgnoreCase("cache") && StringUtils.isNotBlank(coordinate.getGeocode())) { - cgCache cache = cgeoapplication.getInstance().loadCache(coordinate.getGeocode(), LoadFlags.LOAD_CACHE_OR_DB); + cgCache cache = cgData.loadCache(coordinate.getGeocode(), LoadFlags.LOAD_CACHE_OR_DB); RequestDetailsThread requestDetailsThread = new RequestDetailsThread(cache); if (!requestDetailsThread.requestRequired()) { // don't show popup if we have enough details @@ -248,7 +247,7 @@ public class CachesOverlay extends AbstractItemizedOverlay { progress.dismiss(); } catch (Exception e) { - Log.e("cgMapOverlay.onTap: " + e.toString()); + Log.e("cgMapOverlay.onTap", e); if (progress != null) { progress.dismiss(); } @@ -262,7 +261,7 @@ public class CachesOverlay extends AbstractItemizedOverlay { try { return items.get(index); } catch (Exception e) { - Log.e("cgMapOverlay.createItem: " + e.toString()); + Log.e("cgMapOverlay.createItem", e); } return null; @@ -273,7 +272,7 @@ public class CachesOverlay extends AbstractItemizedOverlay { try { return items.size(); } catch (Exception e) { - Log.e("cgMapOverlay.size: " + e.toString()); + Log.e("cgMapOverlay.size", e); } return 0; |
