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

Commit b84138c7 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 23806 into eclair

* changes:
  Handle security exception when Geolocation registers with system location service in DumpRenderTree.
parents e8f605ff 4afcd2e9
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.");
        }
    }

    /**