Merge "USB: Adjust exception message in dealing with permission check" into sc-qpr1-dev am: 9ca7052183

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

Change-Id: I978ebd538bf52d928e655cfb9c8f9f75c34e8eeb
This commit is contained in:
TreeHugger Robot
2021-09-06 09:59:23 +00:00
committed by Automerger Merge Worker

View File

@@ -689,8 +689,10 @@ class UsbUserPermissionManager {
try {
ApplicationInfo aInfo = mContext.getPackageManager().getApplicationInfo(packageName, 0);
if (aInfo.uid != uid) {
throw new IllegalArgumentException("package " + packageName
Slog.w(TAG, "package " + packageName
+ " does not match caller's uid " + uid);
throw new IllegalArgumentException("package " + packageName
+ " not found");
}
} catch (PackageManager.NameNotFoundException e) {
throw new IllegalArgumentException("package " + packageName + " not found");