Add TelephonyShellCommand to get EAB contact
Bug: 174166728
Test: atest
Change-Id: I858e547d6c76263c0cb3438b0c9ae0d8cea556de
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 10b8bc8..e85b483 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -9834,6 +9834,21 @@
}
/**
+ * Get the EAB contact from the EAB database.
+ */
+ @Override
+ public String getContactFromEab(String contact) {
+ TelephonyPermissions.enforceShellOnly(Binder.getCallingUid(), "getContactFromEab");
+ enforceModifyPermission();
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return EabUtil.getContactFromEab(getDefaultPhone().getContext(), contact);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ /**
* Remove the EAB contacts from the EAB database.
*/
@Override