Loading services/usb/java/com/android/server/usb/UsbUserPermissionManager.java +7 −3 Original line number Diff line number Diff line Loading @@ -688,6 +688,8 @@ class UsbUserPermissionManager { String packageName, PendingIntent pi, int uid) { boolean throwException = false; // compare uid with packageName to foil apps pretending to be someone else try { ApplicationInfo aInfo = mContext.getPackageManager().getApplicationInfo(packageName, 0); Loading @@ -695,10 +697,12 @@ class UsbUserPermissionManager { Slog.w(TAG, "package " + packageName + " does not match caller's uid " + uid); EventLog.writeEvent(SNET_EVENT_LOG_ID, "180104273", -1, ""); throw new IllegalArgumentException("package " + packageName + " not found"); throwException = true; } } catch (PackageManager.NameNotFoundException e) { throwException = true; } finally { if (throwException) throw new IllegalArgumentException("package " + packageName + " not found"); } Loading Loading
services/usb/java/com/android/server/usb/UsbUserPermissionManager.java +7 −3 Original line number Diff line number Diff line Loading @@ -688,6 +688,8 @@ class UsbUserPermissionManager { String packageName, PendingIntent pi, int uid) { boolean throwException = false; // compare uid with packageName to foil apps pretending to be someone else try { ApplicationInfo aInfo = mContext.getPackageManager().getApplicationInfo(packageName, 0); Loading @@ -695,10 +697,12 @@ class UsbUserPermissionManager { Slog.w(TAG, "package " + packageName + " does not match caller's uid " + uid); EventLog.writeEvent(SNET_EVENT_LOG_ID, "180104273", -1, ""); throw new IllegalArgumentException("package " + packageName + " not found"); throwException = true; } } catch (PackageManager.NameNotFoundException e) { throwException = true; } finally { if (throwException) throw new IllegalArgumentException("package " + packageName + " not found"); } Loading