aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java')
-rw-r--r--main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java b/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
index 22ce677..98e7db8 100644
--- a/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
+++ b/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
@@ -31,14 +31,15 @@ public final class GeneralAppsFactory extends AbstractAppFactory {
public static boolean onMenuItemSelected(final MenuItem item, Activity activity, cgCache cache) {
final GeneralApp app = (GeneralApp) getAppFromMenuItem(item, apps);
- if (app != null) {
- try {
- return app.invoke(activity, cache);
- } catch (Exception e) {
- Log.e("GeneralAppsFactory.onMenuItemSelected: " + e.toString());
- }
+ if (app == null) {
+ return false;
+ }
+ try {
+ app.invoke(activity, cache);
+ } catch (Exception e) {
+ Log.e("GeneralAppsFactory.onMenuItemSelected: " + e.toString());
}
- return false;
+ return true;
}
}