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

Commit d987c7e6 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Disconnect calls from other CS when hanging over to a self-mgd CS.

When handing over to a self-maanged ConnectionService, automatically
disconnect the other ongoing calls in other ConnectionServices.

Test: Manual
Change-Id: I4d5d51b2ec288fc4fd9c99751654c54f6c8539d6
Fixes: 63154841
parent d7a47b9e
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -2289,6 +2289,12 @@ public class CallsManager extends Call.ListenerBase
        handoverTo.sendCallEvent(android.telecom.Call.EVENT_HANDOVER_COMPLETE, null);
        handoverTo.sendCallEvent(android.telecom.Call.EVENT_HANDOVER_COMPLETE, null);
        answerCall(handoverTo, handoverTo.getVideoState());
        answerCall(handoverTo, handoverTo.getVideoState());
        call.markFinishedHandoverStateAndCleanup(HandoverState.HANDOVER_COMPLETE);
        call.markFinishedHandoverStateAndCleanup(HandoverState.HANDOVER_COMPLETE);

        // If the call we handed over to is self-managed, we need to disconnect the calls for other
        // ConnectionServices.
        if (handoverTo.isSelfManaged()) {
            disconnectOtherCalls(handoverTo.getTargetPhoneAccount());
        }
    }
    }


    private void rejectHandoverTo(Call handoverTo) {
    private void rejectHandoverTo(Call handoverTo) {
@@ -2327,6 +2333,11 @@ public class CallsManager extends Call.ListenerBase


        // Disconnect the call we handed over from.
        // Disconnect the call we handed over from.
        disconnectCall(handoverFrom);
        disconnectCall(handoverFrom);
        // If we handed over to a self-managed ConnectionService, we need to disconnect calls for
        // other ConnectionServices.
        if (handoverTo.isSelfManaged()) {
            disconnectOtherCalls(handoverTo.getTargetPhoneAccount());
        }
    }
    }


    private void updateCanAddCall() {
    private void updateCanAddCall() {