Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7db19e8 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-team Robot
Browse files

Do not notify of WIFI to LTE handover for disconnected call.

It is possible for the onCallHandover callback to indicate that a
call in the process of disconnecting or which has been disconnected already
has handed over from WIFI to LTE.  We suppress the connection event if this
is the case.

Test: Reproduced bug, and then confirmed fix corrects the issue.
Bug: 65490850
Merged-In: Ibaff84dc7e4c3b628d4f9f5b2fdd819220a9d185
Change-Id: I460db6c122188d9bd9a4db4e93cee44bf9c63905
(cherry picked from commit 3e227d75)
parent d1623f4f
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -2552,9 +2552,17 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                                && targetAccessTech != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
                if (isHandoverFromWifi && imsCall.isVideoCall()) {
                    if (mNotifyHandoverVideoFromWifiToLTE && mIsDataEnabled) {
                        if (conn.getDisconnectCause() == DisconnectCause.NOT_DISCONNECTED) {
                            log("onCallHandover :: notifying of WIFI to LTE handover.");
                            conn.onConnectionEvent(
                                    TelephonyManager.EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE, null);
                        } else {
                            // Call has already had a disconnect request issued by the user or is
                            // in the process of disconnecting; do not inform the UI of this as it
                            // is not relevant.
                            log("onCallHandover :: skip notify of WIFI to LTE handover for "
                                    + "disconnected call.");
                        }
                    }

                    if (!mIsDataEnabled && mIsViLteDataMetered) {