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

Commit 43cc4696 authored by Bryan Mawhinney's avatar Bryan Mawhinney
Browse files

Don't return passive location provider unless app has fine permissions.

parent eba3bb06
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -561,7 +561,8 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
    }

    private boolean isAllowedProviderSafe(String provider) {
        if (LocationManager.GPS_PROVIDER.equals(provider)
        if ((LocationManager.GPS_PROVIDER.equals(provider)
                || LocationManager.PASSIVE_PROVIDER.equals(provider))
            && (mContext.checkCallingOrSelfPermission(ACCESS_FINE_LOCATION)
                != PackageManager.PERMISSION_GRANTED)) {
            return false;