summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl1
-rw-r--r--telephony/java/android/telephony/ims/feature/MmTelFeature.java71
2 files changed, 72 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl b/telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl
index 640426b45ba3..c8c8724f3f13 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsMmTelListener.aidl
@@ -35,4 +35,5 @@ interface IImsMmTelListener {
void onRejectedCall(in ImsCallProfile callProfile, in ImsReasonInfo reason);
oneway void onVoiceMessageCountUpdate(int count);
oneway void onAudioModeIsVoipChanged(int imsAudioHandler);
+ oneway void onTriggerEpsFallback(int reason);
}
diff --git a/telephony/java/android/telephony/ims/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
index 4710c1f4dbf3..1c7e9b9b281f 100644
--- a/telephony/java/android/telephony/ims/feature/MmTelFeature.java
+++ b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
@@ -590,6 +590,17 @@ public class MmTelFeature extends ImsFeature {
public void onAudioModeIsVoipChanged(int imsAudioHandler) {
}
+
+ /**
+ * Called when the IMS triggers EPS fallback procedure.
+ *
+ * @param reason specifies the reason that causes EPS fallback.
+ * @hide
+ */
+ @Override
+ public void onTriggerEpsFallback(@EpsFallbackReason int reason) {
+
+ }
}
/**
@@ -662,6 +673,48 @@ public class MmTelFeature extends ImsFeature {
@SystemApi
public static final int AUDIO_HANDLER_BASEBAND = 1;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(
+ prefix = "EPS_FALLBACK_REASON_",
+ value = {
+ EPS_FALLBACK_REASON_INVALID,
+ EPS_FALLBACK_REASON_NO_NETWORK_TRIGGER,
+ EPS_FALLBACK_REASON_NO_NETWORK_RESPONSE,
+ })
+ public @interface EpsFallbackReason {}
+
+ /**
+ * Default value. Internal use only.
+ * This value should not be used to trigger EPS fallback.
+ * @hide
+ */
+ public static final int EPS_FALLBACK_REASON_INVALID = -1;
+
+ /**
+ * If the network only supports the EPS fallback in 5G NR SA for voice calling and the EPS
+ * Fallback procedure by the network during the call setup is not triggered, UE initiated
+ * fallback will be triggered with this reason. The modem shall locally release the 5G NR
+ * SA RRC connection and acquire the LTE network and perform a tracking area update
+ * procedure. After the EPS fallback procedure is completed, the call setup for voice will
+ * be established if there is no problem.
+ *
+ * @hide
+ */
+ public static final int EPS_FALLBACK_REASON_NO_NETWORK_TRIGGER = 1;
+
+ /**
+ * If the UE doesn't receive any response for SIP INVITE within a certain timeout in 5G NR
+ * SA for MO voice calling, the device determines that voice call is not available in 5G and
+ * terminates all active SIP dialogs and SIP requests and enters IMS non-registered state.
+ * In that case, UE initiated fallback will be triggered with this reason. The modem shall
+ * reset modem's data buffer of IMS PDU to prevent the ghost call. After the EPS fallback
+ * procedure is completed, VoLTE call could be tried if there is no problem.
+ *
+ * @hide
+ */
+ public static final int EPS_FALLBACK_REASON_NO_NETWORK_RESPONSE = 2;
+
private IImsMmTelListener mListener;
/**
@@ -830,6 +883,24 @@ public class MmTelFeature extends ImsFeature {
}
/**
+ * Triggers the EPS fallback procedure.
+ *
+ * @param reason specifies the reason that causes EPS fallback.
+ * @hide
+ */
+ public final void triggerEpsFallback(@EpsFallbackReason int reason) {
+ IImsMmTelListener listener = getListener();
+ if (listener == null) {
+ throw new IllegalStateException("Session is not available.");
+ }
+ try {
+ listener.onTriggerEpsFallback(reason);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
* Provides the MmTelFeature with the ability to return the framework Capability Configuration
* for a provided Capability. If the framework calls {@link #changeEnabledCapabilities} and
* includes a capability A to enable or disable, this method should return the correct enabled