Merge "Fix CDM package check"
This commit is contained in:
@@ -391,7 +391,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