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

Commit 0d21e216 authored by Laurent Tu's avatar Laurent Tu
Browse files

Remove checkPermission() call in getAllProviders().

getAllProviders() should return all locators, including those not
allowed or not enabled (according to the existing javadoc, at least).
The checkPermission() call prevented this behavior by throwing a
security exception. We restore the previous behavior by removing the
call.

Bug: 6950369

Change-Id: I0c6bc676d4c4db482bb68f1ab7fa5c93675118b4
parent 57e62034
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -645,12 +645,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run

    /**
     * Returns all providers by name, including passive, but excluding
     * fused.
     * fused, also including ones that are not permitted to
     * be accessed by the calling activity or are currently disabled.
     */
    @Override
    public List<String> getAllProviders() {
        checkPermission();

        ArrayList<String> out;
        synchronized (mLock) {
            out = new ArrayList<String>(mProviders.size());