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

Commit 4afcd2e9 authored by Steve Block's avatar Steve Block
Browse files

Handle security exception when Geolocation registers with system location...

Handle security exception when Geolocation registers with system location service in DumpRenderTree.
parent 558340f2
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -156,12 +156,17 @@ public final class GeolocationService implements LocationListener {
     * Registers this object with the location service.
     */
    private void registerForLocationUpdates() {
        try {
            mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);
            mIsNetworkProviderAvailable = true;
            if (mIsGpsEnabled) {
                mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
                mIsGpsProviderAvailable = true;
            }
        } catch(SecurityException e) {
            Log.e(TAG, "Caught security exception registering for location updates from system. " +
                "This should only happen in DumpRenderTree.");
        }
    }

    /**