aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/cachelist
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2012-02-17 18:01:47 +0100
committerBananeweizen <Bananeweizen@gmx.de>2012-02-17 18:01:47 +0100
commit9649d1c0fc401be51432c7e23943c5cb40679954 (patch)
tree579a5aeeec7d7fe6eadc6e59995eede3016695e1 /main/src/cgeo/geocaching/apps/cachelist
parent5252edc70a02378624144a8e42ae4e71318f9ed3 (diff)
downloadcgeo-9649d1c0fc401be51432c7e23943c5cb40679954.zip
cgeo-9649d1c0fc401be51432c7e23943c5cb40679954.tar.gz
cgeo-9649d1c0fc401be51432c7e23943c5cb40679954.tar.bz2
fix #1110: onPrepareOptionsMenu compatible with Android 3.0
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cachelist')
-rw-r--r--main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java b/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java
index 3bea266..fd19353 100644
--- a/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java
+++ b/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java
@@ -5,6 +5,7 @@ import cgeo.geocaching.SearchResult;
import cgeo.geocaching.Settings;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgGeo;
+import cgeo.geocaching.activity.IAbstractActivity;
import cgeo.geocaching.apps.AbstractAppFactory;
import org.apache.commons.lang3.ArrayUtils;
@@ -62,12 +63,14 @@ public final class CacheListAppFactory extends AbstractAppFactory {
}
public static boolean onMenuItemSelected(final MenuItem item,
- final cgGeo geo, final List<cgCache> caches, final Activity activity,
+ final cgGeo geo, final List<cgCache> caches, final IAbstractActivity activity,
final SearchResult search) {
CacheListApp app = (CacheListApp) getAppFromMenuItem(item, apps);
if (app != null) {
try {
- return app.invoke(geo, caches, activity, search);
+ boolean result = app.invoke(geo, caches, (Activity) activity, search);
+ activity.invalidateOptionsMenuCompatible();
+ return result;
} catch (Exception e) {
Log.e(Settings.tag, "CacheListAppFactory.onMenuItemSelected: " + e.toString());
}