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: I04230906d0abb56880f4fc7c5ad0e30feee29dc0
This commit is contained in:
Jackal Guo
2021-06-21 01:05:03 +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);
}