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

Commit 59bebd51 authored by Jackal Guo's avatar Jackal Guo Committed by Automerger Merge Worker
Browse files

Merge "Revise the IllegalArgumentException check" into sc-dev am: 47330ed2 am: ddd731b6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14972766

Change-Id: I516cb73c0c2a12b9336e5cdc79859a681fd703e4
parents 32b096d5 ddd731b6
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -26487,14 +26487,10 @@ public class PackageManagerService extends IPackageManager.Stub
            final int callingUid = Binder.getCallingUid();
            final int callingUserId = UserHandle.getUserId(callingUid);
            final AndroidPackage pkg = mPackages.get(packageName);
            if (pkg == null) {
                Slog.w(TAG, "KeySet requested for unknown package: " + packageName);
                throw new IllegalArgumentException("Unknown package: " + packageName);
            }
            final PackageSetting ps = getPackageSetting(pkg.getPackageName());
            if (shouldFilterApplicationLocked(ps, callingUid, callingUserId)) {
                // filter and pretend the package doesn't exist
                Slog.w(TAG, "KeySet requested for filtered package: " + packageName
            if (pkg == null
                    || shouldFilterApplicationLocked(getPackageSetting(pkg.getPackageName()),
                    callingUid, callingUserId)) {
                Slog.w(TAG, "KeySet requested for unknown package: " + packageName
                        + ", uid:" + callingUid);
                throw new IllegalArgumentException("Unknown package: " + packageName);
            }