Fix cross user package visibility leakage for PackageManager (2/n)
API: - PackageManager#isPackageSuspended Bug: 214394701 Test: atest CrossUserPackageVisibilityTests Change-Id: Ibe8f7ed8b1dcaa47a6c35593a013957fa3293ab4
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user