Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8fe9732 authored by Jonathan Scott's avatar Jonathan Scott
Browse files

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
parent d5e557e4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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);