From e3b32e76794ab2931f23172b12e0194cfff82390 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Thu, 15 Jul 2010 16:58:38 -0700 Subject: [PATCH] Setting the Geolocation to be only initalized on Android 1.x --- framework/src/com/phonegap/DroidGap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index ac88e7d0..55376327 100644 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -147,7 +147,6 @@ public class DroidGap extends Activity { private void bindBrowser(WebView appView) { gap = new Device(appView, this); - geo = new GeoBroker(appView, this); accel = new AccelBroker(appView, this); launcher = new CameraLauncher(appView, this); mContacts = new ContactManager(appView, this); @@ -160,7 +159,6 @@ public class DroidGap extends Activity { // This creates the new javascript interfaces for PhoneGap appView.addJavascriptInterface(gap, "DroidGap"); - appView.addJavascriptInterface(geo, "Geo"); appView.addJavascriptInterface(accel, "Accel"); appView.addJavascriptInterface(launcher, "GapCam"); appView.addJavascriptInterface(mContacts, "ContactHook"); @@ -175,7 +173,9 @@ public class DroidGap extends Activity { if (android.os.Build.VERSION.RELEASE.startsWith("1.")) { cupcakeStorage = new Storage(appView); + geo = new GeoBroker(appView, this); appView.addJavascriptInterface(cupcakeStorage, "droidStorage"); + appView.addJavascriptInterface(geo, "Geo"); } }