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

Commit 56fe6be0 authored by Jon Larimer's avatar Jon Larimer
Browse files

Enforce permission for using addGpsStatusListener. Even though it's currently...

Enforce permission for using addGpsStatusListener. Even though it's currently hidden and inaccessible from the SDK, it's still
possible for an Android app to use, so it needs to check perms.
parent 78233dd9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -905,6 +905,11 @@ public class LocationManagerService extends ILocationManager.Stub {
        if (mGpsLocationProvider == null) {
            return false;
        }

        if(mContext.checkCallingPermission(ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            throw new SecurityException("Requires ACCESS_FINE_LOCATION permission");
        }

        try {
            mGpsLocationProvider.addGpsStatusListener(listener);
        } catch (RemoteException e) {