summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-05-18 08:28:49 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-05-18 08:28:49 -0700
commitcbb11248c4cee2a74b3352860b1cf703552483fb (patch)
tree97326def94c36c58c1a018faebf4a2ff8fd28a19 /WebCore
parentf25a1d43265db801f96df26ab1058c071f8114a1 (diff)
parent0394c84380567e7a4b3cee843340a3529eb73be1 (diff)
downloadexternal_webkit-cbb11248c4cee2a74b3352860b1cf703552483fb.zip
external_webkit-cbb11248c4cee2a74b3352860b1cf703552483fb.tar.gz
external_webkit-cbb11248c4cee2a74b3352860b1cf703552483fb.tar.bz2
Merge "Make sure Geolocation is robust to location providers being absent on the device."
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/android/GeolocationServiceAndroid.cpp2
-rw-r--r--WebCore/platform/android/GeolocationServiceBridge.cpp8
-rw-r--r--WebCore/platform/android/GeolocationServiceBridge.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp
index 7f7d58e..12a9098 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.cpp
+++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp
@@ -96,7 +96,7 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options, bool sus
// ANDROID
// TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082
if (!suspend)
- m_javaBridge->start();
+ return m_javaBridge->start();
}
return true;
diff --git a/WebCore/platform/android/GeolocationServiceBridge.cpp b/WebCore/platform/android/GeolocationServiceBridge.cpp
index a30d2e6..be68193 100644
--- a/WebCore/platform/android/GeolocationServiceBridge.cpp
+++ b/WebCore/platform/android/GeolocationServiceBridge.cpp
@@ -84,11 +84,11 @@ GeolocationServiceBridge::~GeolocationServiceBridge()
stopJavaImplementation();
}
-void GeolocationServiceBridge::start()
+bool GeolocationServiceBridge::start()
{
ASSERT(m_javaGeolocationServiceObject);
- getJNIEnv()->CallVoidMethod(m_javaGeolocationServiceObject,
- javaGeolocationServiceClassMethodIDs[GeolocationServiceMethodStart]);
+ return getJNIEnv()->CallBooleanMethod(m_javaGeolocationServiceObject,
+ javaGeolocationServiceClassMethodIDs[GeolocationServiceMethodStart]);
}
void GeolocationServiceBridge::stop()
@@ -177,7 +177,7 @@ void GeolocationServiceBridge::startJavaImplementation()
javaGeolocationServiceClassMethodIDs[GeolocationServiceMethodInit] =
env->GetMethodID(javaGeolocationServiceClass, "<init>", "(J)V");
javaGeolocationServiceClassMethodIDs[GeolocationServiceMethodStart] =
- env->GetMethodID(javaGeolocationServiceClass, "start", "()V");
+ env->GetMethodID(javaGeolocationServiceClass, "start", "()Z");
javaGeolocationServiceClassMethodIDs[GeolocationServiceMethodStop] =
env->GetMethodID(javaGeolocationServiceClass, "stop", "()V");
javaGeolocationServiceClassMethodIDs[GeolocationServiceMethodSetEnableGps] =
diff --git a/WebCore/platform/android/GeolocationServiceBridge.h b/WebCore/platform/android/GeolocationServiceBridge.h
index 6cf9ead..5d26142 100644
--- a/WebCore/platform/android/GeolocationServiceBridge.h
+++ b/WebCore/platform/android/GeolocationServiceBridge.h
@@ -43,7 +43,7 @@ public:
GeolocationServiceBridge(ListenerInterface* listener);
~GeolocationServiceBridge();
- void start();
+ bool start();
void stop();
void setEnableGps(bool enable);