aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-10-24 23:13:37 +0200
committerSamuel Tardieu <sam@rfc1149.net>2011-10-24 23:15:28 +0200
commitb6d19eeea75e255c40756b59e1c977988082589f (patch)
treedc63be180c54217850319ebe233ab938a10c8582 /main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
parente5efa831a88cab7675b65a3fb596990d88975ee2 (diff)
downloadcgeo-b6d19eeea75e255c40756b59e1c977988082589f.zip
cgeo-b6d19eeea75e255c40756b59e1c977988082589f.tar.gz
cgeo-b6d19eeea75e255c40756b59e1c977988082589f.tar.bz2
Do not use an extra indirection for storing search results
What is called search result (or cgSearch) in c:geo is a collection of caches that can or cannot come from a real search. Remove the indirection and the ever-growing hash map that was previously used. This will save memory, especially when using live maps. See discussion in issue #707.
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java')
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java b/main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
index 0594558..05bbad3 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
@@ -3,6 +3,7 @@ package cgeo.geocaching.apps.cache.navi;
import cgeo.geocaching.R;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgGeo;
+import cgeo.geocaching.cgSearch;
import cgeo.geocaching.cgWaypoint;
import cgeo.geocaching.enumerations.WaypointType;
import cgeo.geocaching.geopoint.Geopoint;
@@ -11,8 +12,6 @@ import cgeo.geocaching.maps.CGeoMap;
import android.app.Activity;
import android.content.res.Resources;
-import java.util.UUID;
-
class InternalMap extends AbstractInternalMap implements
NavigationApp {
@@ -23,9 +22,9 @@ class InternalMap extends AbstractInternalMap implements
@Override
public boolean invoke(cgGeo geo, Activity activity, Resources res,
cgCache cache,
- final UUID searchId, cgWaypoint waypoint, final Geopoint coords) {
- if (searchId != null) {
- CGeoMap.startActivitySearch(activity, searchId, cache != null ? cache.geocode : null, true);
+ final cgSearch search, cgWaypoint waypoint, final Geopoint coords) {
+ if (search != null) {
+ CGeoMap.startActivitySearch(activity, search, cache != null ? cache.geocode : null, true);
}
else if (cache != null) {
CGeoMap.startActivityGeoCode(activity, cache.geocode);