Make SecurityException message consistent for uploadCallComposerPicture.
Change the message for the two security exception messages to be the same
so as not to reveal which security check failed.
Test: Manual test
Fixes: 190619620
Change-Id: I6661252cd58b11c58c2619aebd40113a430507b6
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 9262084..9eccd10 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -7215,11 +7215,10 @@
try {
if (!Objects.equals(mApp.getPackageManager().getPackageUid(callingPackage, 0),
Binder.getCallingUid())) {
- throw new SecurityException("Package uid and package name do not match: "
- + "uid=" + Binder.getCallingUid() + ", packageName=" + callingPackage);
+ throw new SecurityException("Invalid package:" + callingPackage);
}
} catch (PackageManager.NameNotFoundException e) {
- throw new SecurityException("Package name invalid:" + callingPackage);
+ throw new SecurityException("Invalid package:" + callingPackage);
}
RoleManager rm = mApp.getSystemService(RoleManager.class);
List<String> dialerRoleHolders = rm.getRoleHolders(RoleManager.ROLE_DIALER);