diff options
author | Bananeweizen <Bananeweizen@gmx.de> | 2013-07-31 17:13:45 +0200 |
---|---|---|
committer | Bananeweizen <Bananeweizen@gmx.de> | 2013-07-31 17:13:45 +0200 |
commit | d531ca04a493748e879c4a3a45a8e1a89aa6c5dd (patch) | |
tree | 59d5d952e954e67556be397b12f2901edb9a43b3 /main/src/cgeo/geocaching/apps/cache/GccApp.java | |
parent | 18e9b61de309dac0e09b73017bd604707487562c (diff) | |
download | cgeo-d531ca04a493748e879c4a3a45a8e1a89aa6c5dd.zip cgeo-d531ca04a493748e879c4a3a45a8e1a89aa6c5dd.tar.gz cgeo-d531ca04a493748e879c4a3a45a8e1a89aa6c5dd.tar.bz2 |
fix #3087: GCC pro was not recognized
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cache/GccApp.java')
-rw-r--r-- | main/src/cgeo/geocaching/apps/cache/GccApp.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/GccApp.java b/main/src/cgeo/geocaching/apps/cache/GccApp.java index b129b45..0bbc2dd 100644 --- a/main/src/cgeo/geocaching/apps/cache/GccApp.java +++ b/main/src/cgeo/geocaching/apps/cache/GccApp.java @@ -1,9 +1,28 @@ package cgeo.geocaching.apps.cache; import cgeo.geocaching.R; +import cgeo.geocaching.utils.ProcessUtils; + +import android.content.Intent; public class GccApp extends AbstractGeneralApp { + private static final String PACKAGE = "eisbehr.gcc"; + private static final String PACKAGE_PRO = "eisbehr.gcc.pro"; + public GccApp() { - super(getString(R.string.cache_menu_gcc), "eisbehr.gcc"); + super(getString(R.string.cache_menu_gcc), null); + } + + @Override + public boolean isInstalled() { + return ProcessUtils.isLaunchable(PACKAGE) || ProcessUtils.isLaunchable(PACKAGE_PRO); + } + + @Override + protected Intent getLaunchIntent() { + if (ProcessUtils.isLaunchable(PACKAGE_PRO)) { + return ProcessUtils.getLaunchIntent(PACKAGE_PRO); + } + return ProcessUtils.getLaunchIntent(PACKAGE); } } |