Merge "Allow the system server to query suspendable packages on any user."
This commit is contained in:
committed by
Android (Google) Code Review
commit
603d380d21
@@ -5063,8 +5063,11 @@ public class PackageManagerService implements PackageSender, TestUtilityService
|
||||
"getUnsuspendablePackagesForUser");
|
||||
final int callingUid = Binder.getCallingUid();
|
||||
if (UserHandle.getUserId(callingUid) != userId) {
|
||||
throw new SecurityException("Calling uid " + callingUid
|
||||
+ " cannot query getUnsuspendablePackagesForUser for user " + userId);
|
||||
mContext.enforceCallingOrSelfPermission(
|
||||
Manifest.permission.INTERACT_ACROSS_USERS_FULL,
|
||||
"Calling uid " + callingUid
|
||||
+ " cannot query getUnsuspendablePackagesForUser for user "
|
||||
+ userId);
|
||||
}
|
||||
return mSuspendPackageHelper.getUnsuspendablePackagesForUser(snapshotComputer(),
|
||||
packageNames, userId, callingUid);
|
||||
|
||||
Reference in New Issue
Block a user