USB: Adjust exception message in dealing with permission check
Bug: 180104273
Test: CtsVerifier USB Device Test
Change-Id: Ic676b0d16e7d34b8ddf9dcb218eed0aa41e36cc7
(cherry picked from commit 0304248350)
Merged-In: Ic676b0d16e7d34b8ddf9dcb218eed0aa41e36cc7
This commit is contained in:
@@ -689,8 +689,10 @@ class UsbUserPermissionManager {
|
|||||||
try {
|
try {
|
||||||
ApplicationInfo aInfo = mContext.getPackageManager().getApplicationInfo(packageName, 0);
|
ApplicationInfo aInfo = mContext.getPackageManager().getApplicationInfo(packageName, 0);
|
||||||
if (aInfo.uid != uid) {
|
if (aInfo.uid != uid) {
|
||||||
throw new IllegalArgumentException("package " + packageName
|
Slog.w(TAG, "package " + packageName
|
||||||
+ " does not match caller's uid " + uid);
|
+ " does not match caller's uid " + uid);
|
||||||
|
throw new IllegalArgumentException("package " + packageName
|
||||||
|
+ " not found");
|
||||||
}
|
}
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
throw new IllegalArgumentException("package " + packageName + " not found");
|
throw new IllegalArgumentException("package " + packageName + " not found");
|
||||||
|
|||||||
Reference in New Issue
Block a user