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

Commit 3fc87468 authored by Hall Liu's avatar Hall Liu
Browse files

Clean up RTT streams properly after termination

After downgrading an RTT call to a voice call, we weren't cleaning up
the streams properly, which meant that new streams wouldn't be transmitted
to the connection service if we upgraded to RTT again.

Fixes: 153683581
Test: manual -- upgrade and downgrade RTT over and over again
Change-Id: I05eef906bedf223e9ef89711559a12806aa2822f
parent b6e5b396
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -1715,7 +1715,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            mConnectionProperties = connectionProperties;
            boolean didRttChange =
                    (changedProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT;
            if (didRttChange && (mConnectionProperties & Connection.PROPERTY_IS_RTT) ==
            if (didRttChange) {
                if ((mConnectionProperties & Connection.PROPERTY_IS_RTT) ==
                        Connection.PROPERTY_IS_RTT) {
                    createRttStreams();
                    // Call startRtt to pass the RTT pipes down to the connection service.
@@ -1726,6 +1727,11 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
                    if (isEmergencyCall()) {
                        mCallsManager.mute(false);
                    }
                } else {
                    closeRttStreams();
                    mInCallToConnectionServiceStreams = null;
                    mConnectionServiceToInCallStreams = null;
                }
            }
            mWasHighDefAudio = (connectionProperties & Connection.PROPERTY_HIGH_DEF_AUDIO) ==
                    Connection.PROPERTY_HIGH_DEF_AUDIO;