Add ImsStateCallbackController
registerImsStateCallback and unregisterImsStateCallback are
added to ImsMmTelManager, ImsRcsManager, and SipDelegateManager.
Those are used to receive updates about the connection state
of the underlying ImsService.
ImsStateCallbackController notifies the state of the ImsService
via the registered IImsStateCallback callback interface.
Bug: 178016400
Test: atest ImsStateCallbackControllerTest
Change-Id: I336761a7174bf35d72b6bd0e3040db58fef54daa
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 23cbaac..9607919 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -160,6 +160,7 @@
TelephonyRcsService mTelephonyRcsService;
public PhoneInterfaceManager phoneMgr;
public ImsRcsController imsRcsController;
+ public ImsStateCallbackController mImsStateCallbackController;
CarrierConfigLoader configLoader;
private Phone phoneInEcm;
@@ -463,6 +464,8 @@
imsRcsController = ImsRcsController.init(this);
if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY_IMS)) {
+ mImsStateCallbackController =
+ ImsStateCallbackController.make(this, PhoneFactory.getPhones().length);
mTelephonyRcsService = new TelephonyRcsService(this,
PhoneFactory.getPhones().length);
mTelephonyRcsService.initialize();