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

Commit ce5105c4 authored by Sooraj Sasindran's avatar Sooraj Sasindran Committed by Android (Google) Code Review
Browse files

Merge "Do not use hidden noteOpNoThrow"

parents 4b901db8 2290df31
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -206,8 +206,8 @@ public final class LocationAccessPolicy {
        if (hasManifestPermission) {
            // Only check the app op if the app has the permission.
            int appOpMode = context.getSystemService(AppOpsManager.class)
                    .noteOpNoThrow(AppOpsManager.permissionToOpCode(permissionToCheck),
                            query.callingUid, query.callingPackage, query.callingFeatureId, null);
                    .noteOpNoThrow(permissionToCheck, query.callingUid, query.callingPackage,
                            query.callingFeatureId, null);
            if (appOpMode == AppOpsManager.MODE_ALLOWED) {
                // If the app did everything right, return without logging.
                return LocationPermissionResult.ALLOWED;
@@ -265,7 +265,7 @@ public final class LocationAccessPolicy {
        // Do the check for fine, then for coarse.
        if (query.minSdkVersionForFine < Integer.MAX_VALUE) {
            LocationPermissionResult resultForFine = checkAppLocationPermissionHelper(
                    context, query, Manifest.permission.ACCESS_FINE_LOCATION);
                    context, query, AppOpsManager.OPSTR_FINE_LOCATION);
            if (resultForFine != null) {
                return resultForFine;
            }
@@ -273,7 +273,7 @@ public final class LocationAccessPolicy {

        if (query.minSdkVersionForCoarse < Integer.MAX_VALUE) {
            LocationPermissionResult resultForCoarse = checkAppLocationPermissionHelper(
                    context, query, Manifest.permission.ACCESS_COARSE_LOCATION);
                    context, query, AppOpsManager.OPSTR_COARSE_LOCATION);
            if (resultForCoarse != null) {
                return resultForCoarse;
            }