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

Commit 5aed26c5 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Signal disconnect failure during merge

Ensure that Telecom is notified of a disconnect failure when a call is
currently being merged. This will be leveraged in Telecom to ensure that
the call state is reverted to its original state and not stuck in
disconnecting.

Bug: 409455144
Bug: 406274501
Flag: com.android.server.telecom.flags.revert_disconnecting_during_merge
Test: atest CallTest
Change-Id: If7f7887a460791fc50afc7f954c888de15e3387d
parent 747fc50c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2886,7 +2886,11 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        if (mFeatureFlags.preventHangupDuringCallMerge()) {
            if (imsCall != null && imsCall.isCallSessionMergePending()) {
                if (DBG) log("hangup call failed during call merge");

                // Notify Telecom that the disconnect failed due to an ongoing call merge.
                if (conn != null && mTelecomFlags.revertDisconnectingDuringMerge()) {
                    conn.onConnectionEvent(android.telecom.Connection.EVENT_DISCONNECT_FAILED,
                            null);
                }
                throw new CallStateException("can not hangup during call merge");
            }
        }