Allow the system server to query suspendable packages on any user.
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPersonalAppsSuspensionIme on headless system user device Fixes: 256837990 Change-Id: I519e7dbc038d1a33e0123207c1b5c5685e150207
This commit is contained in:
@@ -5055,8 +5055,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