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

Commit 74ccd4e6 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix issue where video call continues on LTE when wifi lost and data off.

Due to changes in b/36900451 to decouple VT from the data enabled state
of the device, there was a regression in the case where WIFI is lost during
a WIFI video call and mobile data is off.

Changed code to properly handle this case by triggering a disconnect when
video pause signalling is in use.

Test: Manual - turn off wifi when on WIFI video call and mobile data is
disabled.  Regression tested mobile data off auto-pausing.
Bug: 64531514

Merged-In: Ibfcc9c38b261f3162c4af92c705be740b07a6e67
Change-Id: I6561f653cd446b74f127951e02d482f7c9267c9d
parent 214a3eb1
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2530,7 +2530,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                                && targetAccessTech != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN
                                && targetAccessTech != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
                if (isHandoverFromWifi && imsCall.isVideoCall()) {
                    if (mNotifyHandoverVideoFromWifiToLTE) {
                    if (mNotifyHandoverVideoFromWifiToLTE && mIsDataEnabled) {
                        log("onCallHandover :: notifying of WIFI to LTE handover.");
                        conn.onConnectionEvent(
                                TelephonyManager.EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE, null);
@@ -2539,7 +2539,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                    if (!mIsDataEnabled && mIsViLteDataMetered) {
                        // Call was downgraded from WIFI to LTE and data is metered; downgrade the
                        // call now.
                        downgradeVideoCall(ImsReasonInfo.CODE_DATA_DISABLED, conn);
                        downgradeVideoCall(ImsReasonInfo.CODE_WIFI_LOST, conn);
                    }
                }
            } else {
@@ -3499,8 +3499,9 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                // If the carrier supports downgrading to voice, then we can simply issue a
                // downgrade to voice instead of terminating the call.
                modifyVideoCall(imsCall, VideoProfile.STATE_AUDIO_ONLY);
            } else if (mSupportPauseVideo) {
                // The carrier supports video pause signalling, so pause the video.
            } else if (mSupportPauseVideo && reasonCode != ImsReasonInfo.CODE_WIFI_LOST) {
                // The carrier supports video pause signalling, so pause the video if we didn't just
                // lose wifi; in that case just disconnect.
                mShouldUpdateImsConfigOnDisconnect = true;
                conn.pauseVideo(VideoPauseTracker.SOURCE_DATA_ENABLED);
            } else {