RESTRICT AUTOMERGE am: 30b022a8d2 am: 392a927cef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12939924 Change-Id: Ide22b7aad882e5f2613b636d6ac8809e302dba99
This commit is contained in:
@@ -372,7 +372,10 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
|
||||
checkArgument(getCallingUserId() == userId,
|
||||
"Must be called by either same user or system");
|
||||
mAppOpsManager.checkPackage(Binder.getCallingUid(), pkg);
|
||||
int callingUid = Binder.getCallingUid();
|
||||
if (mAppOpsManager.checkPackage(callingUid, pkg) != AppOpsManager.MODE_ALLOWED) {
|
||||
throw new SecurityException(pkg + " doesn't belong to uid " + callingUid);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user