Merge "Revise the IllegalArgumentException check" into sc-dev am: 4c4c6d1b2c

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

Change-Id: I662267ce2353e63f4701982c4ae35b0f48dfe655
This commit is contained in:
Jackal Guo
2021-06-21 01:05:07 +00:00
committed by Automerger Merge Worker

View File

@@ -17129,10 +17129,7 @@ public class PackageManagerService extends IPackageManager.Stub
callerPackageName);
synchronized (mLock) {
PackageSetting ps = mSettings.getPackageLPr(packageName);
if (ps == null) {
throw new IllegalArgumentException("Unknown target package " + packageName);
}
if (shouldFilterApplicationLocked(
if (ps == null || shouldFilterApplicationLocked(
ps, Binder.getCallingUid(), UserHandle.getCallingUserId())) {
throw new IllegalArgumentException("Unknown target package " + packageName);
}