diff options
author | Torsten Keil <github@torsten-keil.net> | 2012-01-14 21:57:16 +0100 |
---|---|---|
committer | Torsten Keil <github@torsten-keil.net> | 2012-01-14 21:57:16 +0100 |
commit | 85897b9e368b4f85377e5cfb7fd6c8a5185d1531 (patch) | |
tree | adef96e9b7ca4784f1c802ef9b2731079e0e710a /main/src/cgeo/geocaching/apps | |
parent | e61a40fc8a4a3d5ab5a59346eddd1c43bcc4857e (diff) | |
download | cgeo-85897b9e368b4f85377e5cfb7fd6c8a5185d1531.zip cgeo-85897b9e368b4f85377e5cfb7fd6c8a5185d1531.tar.gz cgeo-85897b9e368b4f85377e5cfb7fd6c8a5185d1531.tar.bz2 |
Implementation for issue #985: replace term standard navigation
Diffstat (limited to 'main/src/cgeo/geocaching/apps')
-rw-r--r-- | main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java index 67ecfed..5bad5ea 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java @@ -118,6 +118,18 @@ public final class NavigationAppFactory extends AbstractAppFactory { public static void startDefaultNavigationApplication(final cgGeo geo, Activity activity, cgCache cache, final SearchResult search, cgWaypoint waypoint, final Geopoint destination) { + NavigationApp app = getDefaultNavigationApplication(activity); + + if (app != null) { + try { + app.invoke(geo, activity, cache, search, waypoint, destination); + } catch (Exception e) { + Log.e(Settings.tag, "NavigationAppFactory.startDefaultNavigationApplication: " + e.toString()); + } + } + } + + public static NavigationApp getDefaultNavigationApplication(Activity activity) { final int defaultNavigationTool = Settings.getDefaultNavigationTool(); NavigationApp app = null; @@ -134,14 +146,7 @@ public final class NavigationAppFactory extends AbstractAppFactory { } } } - - if (app != null) { - try { - app.invoke(geo, activity, cache, search, waypoint, destination); - } catch (Exception e) { - Log.e(Settings.tag, "NavigationAppFactory.startDefaultNavigationApplication: " + e.toString()); - } - } + return app; } } |