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

Commit a4b3c042 authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Improve behavior of end call from bluetooth headset."

parents 776d2a8b f6662eba
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -514,8 +514,6 @@ public class BluetoothPhoneServiceImpl {
                mCallsManager.disconnectCall(activeCall);
                if (ringingCall != null) {
                    mCallsManager.answerCall(ringingCall, VideoProfile.STATE_AUDIO_ONLY);
                } else if (heldCall != null) {
                    mCallsManager.unholdCall(heldCall);
                }
                return true;
            }
+1 −1
Original line number Diff line number Diff line
@@ -1714,7 +1714,7 @@ public class CallsManager extends Call.ListenerBase
        } else {
            Call activeCall = (Call) mConnectionSvrFocusMgr.getCurrentFocusCall();
            String activeCallId = null;
            if (activeCall != null) {
            if (activeCall != null && !activeCall.isLocallyDisconnecting()) {
                activeCallId = activeCall.getId();
                if (canHold(activeCall)) {
                    activeCall.hold("Swap to " + call.getId());
+2 −1
Original line number Diff line number Diff line
@@ -681,7 +681,8 @@ public class BluetoothPhoneServiceTest extends TelecomTestCase {
                CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD);

        verify(mMockCallsManager).disconnectCall(eq(activeCall));
        verify(mMockCallsManager).unholdCall(eq(heldCall));
        // Call unhold will occur as part of CallsManager auto-unholding the background call on its
        // own.
        assertEquals(didProcess, true);
    }