Merge "Revise the IllegalArgumentException check" into sc-dev

This commit is contained in:
Jackal Guo
2021-06-21 00:55:27 +00:00
committed by Android (Google) Code Review

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);
}