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

Commit f9d5a079 authored by Victoria Lease's avatar Victoria Lease Committed by Android Git Automerger
Browse files

am 18c2b6e7: Merge "throw SecurityException in isProviderEnabled()" into jb-mr1-dev

* commit '18c2b6e7':
  throw SecurityException in isProviderEnabled()
parents a12f3478 18c2b6e7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1292,8 +1292,13 @@ public class LocationManagerService extends ILocationManager.Stub implements Run

    @Override
    public boolean isProviderEnabled(String provider) {
        checkPermission();
        String perms = checkPermission();
        if (LocationManager.FUSED_PROVIDER.equals(provider)) return false;
        if (ACCESS_COARSE_LOCATION.equals(perms) &&
                !isProviderAllowedByCoarsePermission(provider)) {
            throw new SecurityException("The \"" + provider +
                    "\" provider requires ACCESS_FINE_LOCATION permission");
        }

        synchronized (mLock) {
            LocationProviderInterface p = mProvidersByName.get(provider);