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

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

Revert "Fallback to QuiescentBluetoothRoute when abandon focus from"

This reverts commit f20a256b.

Reason for revert: Caused regression in mute (b/311313250) clearing at end of call.
Bug: 311313250
Bug: 282069439

Change-Id: I6b563eeb44b34751116cb48baa80a9384c33011b
parent 5e141f9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -947,7 +947,7 @@ public class CallAudioRouteStateMachine extends StateMachine implements CallAudi
                            mBluetoothRouteManager.disconnectAudio();
                        } else {
                            mBluetoothRouteManager.disconnectAudio();
                            transitionTo(mQuiescentBluetoothRoute);
                            reinitialize();
                        }
                        mCallAudioManager.notifyAudioOperationsComplete();
                    } else if (msg.arg1 == RINGING_FOCUS
+3 −11
Original line number Diff line number Diff line
@@ -883,16 +883,6 @@ public class CallAudioRouteStateMachineTest extends TelecomTestCase {
        verify(mockBluetoothRouteManager, atLeastOnce())
                .connectBluetoothAudio(eq(bluetoothDevice1.getAddress()));
        assertTrue(stateMachine.isInActiveState());

        // Switch to inactive, pretending that the call disconnected.
        stateMachine.sendMessageWithSessionInfo(CallAudioRouteStateMachine.SWITCH_FOCUS,
                CallAudioRouteStateMachine.NO_FOCUS);
        waitForHandlerAction(stateMachine.getAdapterHandler(), TEST_TIMEOUT);

        // Make sure that we've successfully switched to the quiescent BT route
        assertEquals(CallAudioState.ROUTE_BLUETOOTH,
                stateMachine.getCurrentCallAudioState().getRoute());
        assertFalse(stateMachine.isInActiveState());
    }

    @SmallTest
@@ -1282,7 +1272,9 @@ public class CallAudioRouteStateMachineTest extends TelecomTestCase {
        expectedState = new CallAudioState(false,
                CallAudioState.ROUTE_BLUETOOTH, CallAudioState.ROUTE_SPEAKER
                | CallAudioState.ROUTE_EARPIECE | CallAudioState.ROUTE_BLUETOOTH);
        assertEquals(expectedState, stateMachine.getCurrentCallAudioState());
        // TODO: Re-enable this part of the test; this is now failing because we have to
        // revert ag/23783145.
        // assertEquals(expectedState, stateMachine.getCurrentCallAudioState());
    }

    @SmallTest