Exposes getImsServiceControllerAndListen interface

Exposes hidden API that allows an ImsManager to get an
IImsServiceController and register a callback.

Test: Manual
Merged-In: I160d75fc771f9f1d7eabf72181f4bc3d36d28d9b
Change-Id: I160d75fc771f9f1d7eabf72181f4bc3d36d28d9b
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 38e40d7..b1ad364 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -62,6 +62,8 @@
 import android.util.Pair;
 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;
@@ -2353,6 +2355,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);