From d987c7e6979cb532f00d0eeaa247cda9ed3c185d Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 22 Aug 2017 15:40:38 -0700 Subject: 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 --- src/com/android/server/telecom/CallsManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java index 1ee888b9..c44e4fab 100644 --- a/src/com/android/server/telecom/CallsManager.java +++ b/src/com/android/server/telecom/CallsManager.java @@ -2289,6 +2289,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) { @@ -2327,6 +2333,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() { -- cgit v1.2.3