diff options
author | Bananeweizen <Bananeweizen@gmx.de> | 2012-02-17 18:01:47 +0100 |
---|---|---|
committer | Bananeweizen <Bananeweizen@gmx.de> | 2012-02-17 18:01:47 +0100 |
commit | 9649d1c0fc401be51432c7e23943c5cb40679954 (patch) | |
tree | 579a5aeeec7d7fe6eadc6e59995eede3016695e1 /main/src/cgeo/geocaching/apps/cachelist | |
parent | 5252edc70a02378624144a8e42ae4e71318f9ed3 (diff) | |
download | cgeo-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.java | 7 |
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()); } |