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

Commit 304786cf authored by Hai Zhang's avatar Hai Zhang Committed by Automerger Merge Worker
Browse files

Merge "Don't sync app op mode for root and system uid." into rvc-dev am: 797afd58

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11897532

Change-Id: I6db4e94f974acc6c4663299dd04cee452d210906
parents 3524dd90 797afd58
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -825,7 +825,15 @@ public final class PermissionPolicyService extends SystemService {
                return;
                return;
            }
            }


            if (pkgInfo == null || pkg == null || pkgInfo.requestedPermissions == null) {
            if (pkgInfo == null || pkg == null || pkgInfo.applicationInfo == null
                    || pkgInfo.requestedPermissions == null) {
                return;
            }

            final int uid = pkgInfo.applicationInfo.uid;
            if (uid == Process.ROOT_UID || uid == Process.SYSTEM_UID) {
                // Root and system server always pass permission checks, so don't touch their app
                // ops to keep compatibility.
                return;
                return;
            }
            }