From efed6f6bd4df9c8dc08a505615a8426230363ec3 Mon Sep 17 00:00:00 2001 From: Anju Mathapati Date: Mon, 27 Mar 2017 15:43:20 -0700 Subject: [PATCH 1/2] IMS: Support for Possible Call Session Handover Adding the callSessionMayHandover API that allows for the lower layers to indicate that the call session may handover based on actions taken by the user/UI layer. The API provides current and target RAT information pertaining to the possible handover. Bug: 62489988 Test: Manual Change-Id: I006462ce5688bb99a94d5135574fb2c17878685a --- .../java/com/android/ims/internal/IImsCallSessionListener.aidl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl index ad59c1d84794b..831ab12fc3eaa 100644 --- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl +++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl @@ -106,6 +106,8 @@ interface IImsCallSessionListener { in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo); void callSessionHandoverFailed(in IImsCallSession session, in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo); + void callSessionMayHandover(in IImsCallSession session, + in int srcAccessTech, in int targetAccessTech); /** * Notifies the TTY mode change by remote party. From 71c29cfad971aba24475d16698e5243316006b66 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Fri, 9 Jun 2017 13:16:06 -0700 Subject: [PATCH 2/2] Add callSessionMayHandover API to ImsCallSession. This matches the new AIDL definition in the API. Test: Manual Bug: 62489988 Change-Id: I97ad5b5359f19d533b5b8644fd37008c0c69bf9c --- .../stub/ImsCallSessionListenerImplBase.java | 17 ++++++++ .../android/ims/internal/ImsCallSession.java | 40 +++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java index 12228a19fcc8f..6c18935d16ef6 100644 --- a/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java +++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java @@ -195,6 +195,23 @@ public class ImsCallSessionListenerImplBase extends IImsCallSessionListener.Stub // no-op } + /** + * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may potentially + * handover from one radio technology to another. + * @param session + * @param srcAccessTech The source radio access technology; one of the access technology + * constants defined in {@link android.telephony.ServiceState}. For + * example {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}. + * @param targetAccessTech The target radio access technology; one of the access technology + * constants defined in {@link android.telephony.ServiceState}. For + * example {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}. + */ + @Override + public void callSessionMayHandover(IImsCallSession session, int srcAccessTech, + int targetAccessTech) { + // no-op + } + /** * Notifies of handover information for this call */ diff --git a/telephony/java/com/android/ims/internal/ImsCallSession.java b/telephony/java/com/android/ims/internal/ImsCallSession.java index f20f7c8819582..1736b80c562b3 100644 --- a/telephony/java/com/android/ims/internal/ImsCallSession.java +++ b/telephony/java/com/android/ims/internal/ImsCallSession.java @@ -344,6 +344,24 @@ public class ImsCallSession { // no-op } + /** + * Called when an {@link ImsCallSession} may handover from one radio technology to another. + * For example, the session may handover from WIFI to LTE if conditions are right. + *

+ * If handover is attempted, + * {@link #callSessionHandover(ImsCallSession, int, int, ImsReasonInfo)} or + * {@link #callSessionHandoverFailed(ImsCallSession, int, int, ImsReasonInfo)} will be + * called to indicate the success or failure of the handover. + * + * @param session IMS session object + * @param srcAccessTech original access technology + * @param targetAccessTech new access technology + */ + public void callSessionMayHandover(ImsCallSession session, int srcAccessTech, + int targetAccessTech) { + // no-op + } + /** * Called when session access technology changes * @@ -1280,6 +1298,28 @@ public class ImsCallSession { } } + /** + * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may + * potentially handover from one radio technology to another. + * @param session + * @param srcAccessTech The source radio access technology; one of the access technology + * constants defined in {@link android.telephony.ServiceState}. For + * example + * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}. + * @param targetAccessTech The target radio access technology; one of the access technology + * constants defined in {@link android.telephony.ServiceState}. For + * example + * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}. + */ + @Override + public void callSessionMayHandover(IImsCallSession session, + int srcAccessTech, int targetAccessTech) { + if (mListener != null) { + mListener.callSessionMayHandover(ImsCallSession.this, srcAccessTech, + targetAccessTech); + } + } + /** * Notifies of handover information for this call */