summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/GeolocationService.java
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-06-28 10:26:39 +0100
committerSteve Block <steveblock@google.com>2010-06-29 13:11:51 +0100
commit074c08c4ebbba0875549496829ee7872dd153ee8 (patch)
treef65e5e444a8da800be6256907c0c9142435cbfd1 /core/java/android/webkit/GeolocationService.java
parent26ae3b66e5eb4975cb547e18061123a39f01e77d (diff)
Pass the WebView context to the GeolocationService from WebKit
Bug: 2798745 Change-Id: I53e7c5f9ac1cf017a6f7d83e6d0fd57bc1d3403a
Diffstat (limited to 'core/java/android/webkit/GeolocationService.java')
-rwxr-xr-xcore/java/android/webkit/GeolocationService.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/webkit/GeolocationService.java b/core/java/android/webkit/GeolocationService.java
index 183b3c0d8862..91de1d8f92e6 100755
--- a/core/java/android/webkit/GeolocationService.java
+++ b/core/java/android/webkit/GeolocationService.java
@@ -45,14 +45,13 @@ final class GeolocationService implements LocationListener {
/**
* Constructor
+ * @param context The context from which we obtain the system service.
* @param nativeObject The native object to which this object will report position updates and
* errors.
*/
- public GeolocationService(long nativeObject) {
+ public GeolocationService(Context context, long nativeObject) {
mNativeObject = nativeObject;
// Register newLocationAvailable with platform service.
- ActivityThread thread = ActivityThread.systemMain();
- Context context = thread.getApplication();
mLocationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
if (mLocationManager == null) {
Log.e(TAG, "Could not get location manager.");