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.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java b/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
index ad72dc9..a845108 100644
--- a/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
+++ b/main/src/cgeo/geocaching/apps/cache/GeneralAppsFactory.java
@@ -1,13 +1,12 @@
package cgeo.geocaching.apps.cache;
-import cgeo.geocaching.cgCache;
import cgeo.geocaching.Settings;
+import cgeo.geocaching.cgCache;
import cgeo.geocaching.apps.AbstractAppFactory;
import org.apache.commons.lang3.ArrayUtils;
import android.app.Activity;
-import android.content.res.Resources;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -15,17 +14,16 @@ import android.view.MenuItem;
public final class GeneralAppsFactory extends AbstractAppFactory {
private static GeneralApp[] apps = new GeneralApp[] {};
- private static GeneralApp[] getGeneralApps(Resources res) {
+ private static GeneralApp[] getGeneralApps() {
if (ArrayUtils.isEmpty(apps)) {
- apps = new GeneralApp[] { new GccApp(res),
- new WhereYouGoApp(res) };
+ apps = new GeneralApp[] { new GccApp(),
+ new WhereYouGoApp() };
}
return apps;
}
- public static void addMenuItems(Menu menu, Activity activity,
- Resources res, cgCache cache) {
- for (GeneralApp app : getGeneralApps(res)) {
+ public static void addMenuItems(Menu menu, Activity activity, cgCache cache) {
+ for (GeneralApp app : getGeneralApps()) {
if (app.isInstalled(activity) && app.isEnabled(cache)) {
menu.add(0, app.getId(), 0, app.getName());
}
@@ -34,7 +32,7 @@ public final class GeneralAppsFactory extends AbstractAppFactory {
public static boolean onMenuItemSelected(final MenuItem item,
Activity activity, cgCache cache) {
- GeneralApp app = (GeneralApp) getAppFromMenuItem(item, apps);
+ final GeneralApp app = (GeneralApp) getAppFromMenuItem(item, apps);
if (app != null) {
try {
return app.invoke(activity, cache);