Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03042483 authored by James Wei's avatar James Wei
Browse files

USB: Adjust exception message in dealing with permission check

Bug: 180104273
Test: CtsVerifier USB Device Test
Change-Id: Ic676b0d16e7d34b8ddf9dcb218eed0aa41e36cc7
parent c689abb7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -673,8 +673,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");