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

Commit bad3a9b8 authored by Rhed Jao's avatar Rhed Jao
Browse files

Fix cross user package visibility leakage for PackageManager (2/n)

API:
- PackageManager#isPackageSuspended

Bug: 214394701
Test: atest CrossUserPackageVisibilityTests
Change-Id: Ibe8f7ed8b1dcaa47a6c35593a013957fa3293ab4
parent f5f55f41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4990,7 +4990,7 @@ public class ComputerEngine implements Computer {
        enforceCrossUserPermission(callingUid, userId, true /* requireFullPermission */,
                false /* checkShell */, "isPackageSuspendedForUser for user " + userId);
        final PackageStateInternal ps = mSettings.getPackage(packageName);
        if (ps == null || shouldFilterApplication(ps, callingUid, userId)) {
        if (ps == null || shouldFilterApplicationIncludingUninstalled(ps, callingUid, userId)) {
            throw new IllegalArgumentException("Unknown target package: " + packageName);
        }
        return ps.getUserStateOrDefault(userId).isSuspended();