Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f96d23ae authored by Steve Block's avatar Steve Block Committed by Android (Google) Code Review
Browse files

Merge "Pass the WebView context to the GeolocationService from WebKit"

parents 7c32c0df 074c08c4
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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.");