Integrate MMTel API into the framework
1) Futher integration of the ImsSerice
Test App for verification.
2) Changes some classes to integrate with the
new ImsService API.
3) Adds enable/DisableIms API and some more
misc. piping into telephony from
TelephonyManager.
Bug: 63987047
Test: Run ImsService Test App
Merged-In: Id34823fcaa9975968e2fd223f53f756a46da24bd
Change-Id: Id34823fcaa9975968e2fd223f53f756a46da24bd
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index e1e4303..4933ed8 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -71,6 +71,10 @@
import android.telephony.UiccSlotInfo;
import android.telephony.UssdResponse;
import android.telephony.VisualVoicemailSmsFilterSettings;
+import android.telephony.ims.aidl.IImsConfig;
+import android.telephony.ims.aidl.IImsMmTelFeature;
+import android.telephony.ims.aidl.IImsRcsFeature;
+import android.telephony.ims.aidl.IImsRegistration;
import android.text.TextUtils;
import android.util.ArraySet;
import android.util.Log;
@@ -78,9 +82,6 @@
import android.util.Slog;
import com.android.ims.ImsManager;
-import com.android.ims.internal.IImsMMTelFeature;
-import com.android.ims.internal.IImsRcsFeature;
-import com.android.ims.internal.IImsRegistration;
import com.android.ims.internal.IImsServiceFeatureCallback;
import com.android.internal.telephony.CallManager;
import com.android.internal.telephony.CallStateException;
@@ -2622,26 +2623,32 @@
}
/**
- * Returns the {@link IImsMMTelFeature} that corresponds to the given slot Id for the MMTel
- * feature or {@link null} if the service is not available. If the feature is available, the
- * {@link IImsServiceFeatureCallback} callback is registered as a listener for feature updates.
+ * Enables IMS for the framework. This will trigger IMS registration and ImsFeature capability
+ * status updates, if not already enabled.
*/
- public IImsMMTelFeature getMMTelFeatureAndListen(int slotId,
- IImsServiceFeatureCallback callback) {
+ public void enableIms(int slotId) {
enforceModifyPermission();
- return PhoneFactory.getImsResolver().getMMTelFeatureAndListen(slotId, callback);
+ PhoneFactory.getImsResolver().enableIms(slotId);
}
/**
- * Returns the {@link IImsMMTelFeature} that corresponds to the given slot Id for the MMTel
- * feature during emergency calling or {@link null} if the service is not available. If the
- * feature is available, the {@link IImsServiceFeatureCallback} callback is registered as a
- * listener for feature updates.
+ * Disables IMS for the framework. This will trigger IMS de-registration and trigger ImsFeature
+ * status updates to disabled.
*/
- public IImsMMTelFeature getEmergencyMMTelFeatureAndListen(int slotId,
+ public void disableIms(int slotId) {
+ enforceModifyPermission();
+ PhoneFactory.getImsResolver().disableIms(slotId);
+ }
+
+ /**
+ * Returns the {@link IImsMmTelFeature} that corresponds to the given slot Id for the MMTel
+ * feature or {@link null} if the service is not available. If the feature is available, the
+ * {@link IImsServiceFeatureCallback} callback is registered as a listener for feature updates.
+ */
+ public IImsMmTelFeature getMmTelFeatureAndListen(int slotId,
IImsServiceFeatureCallback callback) {
enforceModifyPermission();
- return PhoneFactory.getImsResolver().getEmergencyMMTelFeatureAndListen(slotId, callback);
+ return PhoneFactory.getImsResolver().getMmTelFeatureAndListen(slotId, callback);
}
/**
@@ -2664,6 +2671,15 @@
return PhoneFactory.getImsResolver().getImsRegistration(slotId, feature);
}
+ /**
+ * Returns the {@link IImsConfig} structure associated with the slotId and feature
+ * specified.
+ */
+ public IImsConfig getImsConfig(int slotId, int feature) throws RemoteException {
+ enforceModifyPermission();
+ return PhoneFactory.getImsResolver().getImsConfig(slotId, feature);
+ }
+
public void setImsRegistrationState(boolean registered) {
enforceModifyPermission();
mPhone.setImsRegistrationState(registered);