Merge "Don't sync app op mode for root and system uid." into rvc-dev am: 797afd58f8 am: ca81664327
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11897532 Change-Id: I8ba5ec2e92eecfc70cc359d342a8208bcf6465e9
This commit is contained in:
@@ -825,7 +825,15 @@ public final class PermissionPolicyService extends SystemService {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user