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

Commit 52d1a6b5 authored by Billy Lau's avatar Billy Lau Committed by The Android Automerger
Browse files

Bug: 22879202 App compatibility with WRITE_SETTINGS failing

Fix a bug in the app ops protected permission check that broke backwards
compatibility.

Change-Id: Ic73759edd29a479a670fb31407e36aa50d09b6c3
parent 80c88659
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -8333,9 +8333,9 @@ public final class Settings {
                return true;
            case AppOpsManager.MODE_DEFAULT:
                // this is the default operating mode after an app's installation
                if (!throwException) {
                    return context.checkCallingOrSelfPermission(permissionName) ==
                        PackageManager.PERMISSION_GRANTED;
                if(context.checkCallingOrSelfPermission(permissionName) == PackageManager
                        .PERMISSION_GRANTED) {
                    return true;
                }
            default:
                // this is for all other cases trickled down here...