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

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

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

am: a4b3c042

Change-Id: I9913046d1415e1288f5db135d64cb6a1659a3796
parents 31e30b72 a4b3c042
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);
    }