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

Commit 87182edc authored by Brad Ebinger's avatar Brad Ebinger Committed by Gerrit Code Review
Browse files

Merge "Do not remove local video capabilities for Wifi call when mobile data is off"

parents 587752f7 42580f0d
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -2782,7 +2782,15 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                    }
                }

                if (isHandoverToWifi && mIsViLteDataMetered) {
                    conn.setLocalVideoCapable(true);
                }

                if (isHandoverFromWifi && imsCall.isVideoCall()) {
                    if (mIsViLteDataMetered) {
                        conn.setLocalVideoCapable(mIsDataEnabled);
                    }

                    if (mNotifyHandoverVideoFromWifiToLTE &&    mIsDataEnabled) {
                        if (conn.getDisconnectCause() == DisconnectCause.NOT_DISCONNECTED) {
                            log("onCallHandover :: notifying of WIFI to LTE handover.");
@@ -3768,7 +3776,9 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        // Inform connections that data has been disabled to ensure we turn off video capability
        // if this is an LTE call.
        for (ImsPhoneConnection conn : mConnections) {
            conn.handleDataEnabledChange(enabled);
            ImsCall imsCall = conn.getImsCall();
            boolean isLocalVideoCapable = enabled || (imsCall != null && imsCall.isWifiCall());
            conn.setLocalVideoCapable(isLocalVideoCapable);
        }

        int reasonCode;
+5 −5
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ public class ImsPhoneConnection extends Connection implements
     * currently available, but mobile data is off and the carrier is metering data for video
     * calls.
     */
    private boolean mIsVideoEnabled = true;
    private boolean mIsLocalVideoCapable = true;

    //***** Event Constants
    private static final int EVENT_DTMF_DONE = 1;
@@ -264,7 +264,7 @@ public class ImsPhoneConnection extends Connection implements
        capabilities = removeCapability(capabilities,
                Connection.Capability.SUPPORTS_VT_LOCAL_BIDIRECTIONAL);

        if (!mIsVideoEnabled) {
        if (!mIsLocalVideoCapable) {
            Rlog.i(LOG_TAG, "applyLocalCallCapabilities - disabling video (overidden)");
            return capabilities;
        }
@@ -1352,9 +1352,9 @@ public class ImsPhoneConnection extends Connection implements
        mShouldIgnoreVideoStateChanges = false;
    }

    public void handleDataEnabledChange(boolean isDataEnabled) {
        mIsVideoEnabled = isDataEnabled;
        Rlog.i(LOG_TAG, "handleDataEnabledChange: isDataEnabled=" + isDataEnabled
    public void setLocalVideoCapable(boolean isVideoEnabled) {
        mIsLocalVideoCapable = isVideoEnabled;
        Rlog.i(LOG_TAG, "setLocalVideoCapable: mIsLocalVideoCapable = " + mIsLocalVideoCapable
                + "; updating local video availability.");
        updateMediaCapabilities(getImsCall());
    }