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

Commit fc8489ab authored by Jackal Guo's avatar Jackal Guo Committed by Android (Google) Code Review
Browse files

Merge "Fix cross user app visibility gap for setPackagesSuspended"

parents 7915aa66 c7112149
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -126,10 +126,9 @@ public final class SuspendPackageHelper {
                unmodifiablePackages.add(packageName);
                continue;
            }
            final PackageStateInternal packageState =
                    snapshot.getPackageStateForInstalledAndFiltered(
                            packageName, callingUid, userId);
            if (packageState == null) {
            final PackageStateInternal packageState = snapshot.getPackageStateInternal(packageName);
            if (packageState == null || !packageState.getUserStateOrDefault(userId).isInstalled()
                    || snapshot.shouldFilterApplication(packageState, callingUid, userId)) {
                Slog.w(TAG, "Could not find package setting for package: " + packageName
                        + ". Skipping suspending/un-suspending.");
                unmodifiablePackages.add(packageName);