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

Commit eaf772a7 authored by Brad Ebinger's avatar Brad Ebinger Committed by android-build-merger
Browse files

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

Merge "Do not remove local video capabilities for Wifi call when mobile data is off" am: 87182edc am: 08efc5f6
am: 2f2cf903

Change-Id: I9e0b154630173ad8d23d26b5d138614b7cc5c1e2
parents 102e66e7 2f2cf903
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -2784,7 +2784,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.");
@@ -3770,7 +3778,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;
        }
@@ -1355,9 +1355,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());
    }