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

Commit 11482969 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix logic for clients with no location permissions"

parents d6384e43 33bc954b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -127,6 +127,10 @@ public class AppOpsHelper {
            Preconditions.checkState(mAppOps != null);
        }

        if (permissionLevel == LocationPermissions.PERMISSION_NONE) {
            return false;
        }

        long identity = Binder.clearCallingIdentity();
        try {
            return mAppOps.checkOpNoThrow(
@@ -145,6 +149,10 @@ public class AppOpsHelper {
     */
    public boolean noteLocationAccess(CallerIdentity identity,
            @PermissionLevel int permissionLevel) {
        if (permissionLevel == LocationPermissions.PERMISSION_NONE) {
            return false;
        }

        return noteOpNoThrow(LocationPermissions.asAppOp(permissionLevel), identity);
    }