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

Commit c1bf3515 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

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

am: 632547e1

Change-Id: I381012bf3dbed19c6014f0ec2262dbf79fbbf0e2
parents b50a5273 632547e1
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2298,6 +2298,12 @@ public class CallsManager extends Call.ListenerBase
        handoverTo.sendCallEvent(android.telecom.Call.EVENT_HANDOVER_COMPLETE, null);
        answerCall(handoverTo, handoverTo.getVideoState());
        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) {
@@ -2336,6 +2342,11 @@ public class CallsManager extends Call.ListenerBase

        // Disconnect the call we handed over from.
        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() {