diff options
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/android/GeolocationServiceAndroid.cpp | 10 | ||||
-rw-r--r-- | WebCore/platform/android/PlatformBridge.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp index 43a8f5f..3ffb9b9 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.cpp +++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp @@ -28,6 +28,7 @@ #include "GeolocationServiceBridge.h" #include "Geoposition.h" +#include "PlatformBridge.h" #include "PositionError.h" #include "PositionOptions.h" @@ -83,8 +84,13 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options) if (options->enableHighAccuracy()) m_javaBridge->setEnableGps(true); - if (!haveJavaBridge) - m_javaBridge->start(); + // We need only start the service when it's first created. + if (!haveJavaBridge) { + // If the browser is paused, don't start the service. It will be started + // when we get the call to resume. + if (!PlatformBridge::isWebViewPaused()) + m_javaBridge->start(); + } return true; } diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h index a1ed50a..a73abab 100644 --- a/WebCore/platform/android/PlatformBridge.h +++ b/WebCore/platform/android/PlatformBridge.h @@ -71,6 +71,8 @@ public: static void immediateRepaint(const FrameView* view); #endif // USE(ACCELERATED_COMPOSITING) + // Whether the WebView is paused. + static bool isWebViewPaused(); }; } |