DO NOT MERGE Fix PermissionManagerService throwing exception for unknown package.

am: 03bb8eeeaa

Change-Id: If6c6aa242889063daa920943f190cdff4843d68f
This commit is contained in:
Hai Zhang
2019-08-04 00:50:52 -07:00
committed by android-build-merger

View File

@@ -2098,7 +2098,8 @@ public class PermissionManagerService {
final PackageParser.Package pkg = mPackageManagerInt.getPackage(packageName);
if (pkg == null || pkg.mExtras == null) {
throw new IllegalArgumentException("Unknown package: " + packageName);
Log.e(TAG, "Unknown package: " + packageName);
return;
}
final BasePermission bp;
synchronized(mLock) {
@@ -2239,7 +2240,8 @@ public class PermissionManagerService {
final PackageParser.Package pkg = mPackageManagerInt.getPackage(packageName);
if (pkg == null || pkg.mExtras == null) {
throw new IllegalArgumentException("Unknown package: " + packageName);
Log.e(TAG, "Unknown package: " + packageName);
return;
}
if (mPackageManagerInt.filterAppAccess(pkg, Binder.getCallingUid(), userId)) {
throw new IllegalArgumentException("Unknown package: " + packageName);