Exposes getImsServiceControllerAndListen interface
Exposes hidden API that allows an ImsManager to get an
IImsServiceController and register a callback.
Test: Manual
Change-Id: I160d75fc771f9f1d7eabf72181f4bc3d36d28d9b
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 81e6abc..9c92a04 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -69,6 +69,8 @@
import android.util.Slog;
import com.android.ims.ImsManager;
+import com.android.ims.internal.IImsServiceController;
+import com.android.ims.internal.IImsServiceFeatureListener;
import com.android.internal.telephony.CallManager;
import com.android.internal.telephony.CellNetworkScanResult;
import com.android.internal.telephony.CommandException;
@@ -2437,6 +2439,19 @@
return mPhone.getPcscfAddress(apnType);
}
+ /**
+ * Returns the {@link IImsServiceController} that corresponds to the given slot Id and IMS
+ * feature or {@link null} if the service is not available. If an ImsServiceController is
+ * available, the {@link IImsServiceFeatureListener} callback is registered as a listener for
+ * feature updates.
+ */
+ public IImsServiceController getImsServiceControllerAndListen(int slotId, int feature,
+ IImsServiceFeatureListener callback) {
+ enforceModifyPermission();
+ return PhoneFactory.getImsResolver().getImsServiceControllerAndListen(slotId, feature,
+ callback);
+ }
+
public void setImsRegistrationState(boolean registered) {
enforceModifyPermission();
mPhone.setImsRegistrationState(registered);