Add dump() to ImsStateCallbackController
It is updated to dump the state of ImsStateCallbackController
when dumpsys for the service, phone, is called.
Bug: 178016400
Test: manual
Change-Id: I04abab941b55b81305a9e3fd327874dab3779323
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index e3aa90a..b3ee8eb 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -10961,7 +10961,8 @@
* Register an IMS connection state callback
*/
@Override
- public void registerImsStateCallback(int subId, int feature, IImsStateCallback cb) {
+ public void registerImsStateCallback(int subId, int feature, IImsStateCallback cb,
+ String callingPackage) {
if (feature == ImsFeature.FEATURE_MMTEL) {
// ImsMmTelManager
// The following also checks READ_PRIVILEGED_PHONE_STATE.
@@ -10993,10 +10994,14 @@
"IMS not available on device.");
}
+ if (callingPackage == null) {
+ callingPackage = getCurrentPackageName();
+ }
+
final long token = Binder.clearCallingIdentity();
try {
int slotId = getSlotIndexOrException(subId);
- controller.registerImsStateCallback(subId, feature, cb);
+ controller.registerImsStateCallback(subId, feature, cb, callingPackage);
} catch (ImsException e) {
throw new ServiceSpecificException(e.getCode());
} finally {