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

Commit d27428df authored by Hui Wang's avatar Hui Wang
Browse files

Do not auto switch to speaker until the video call is active

Flag: EXEMPT bugfix
Bug: 411510744
Test: manual

Change-Id: I0f21214a2582aec498bd0c69ac4c5dbc557bba4c
parent 14c992eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1354,8 +1354,9 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
        Call foregroundCall = mCallAudioManager.getForegroundCall();
        if (!isExplicitUserRequest) {
            synchronized (mTelecomLock) {
                skipEarpiece = foregroundCall != null
                skipEarpiece = foregroundCall != null && foregroundCall.isActive()
                        && VideoProfile.isVideo(foregroundCall.getVideoState());
                Log.i(this, "skipEarpiece for video call?" + skipEarpiece);
            }
        }
        // Route to earpiece, wired, or speaker route if there are not bluetooth routes or if there
+1 −0
Original line number Diff line number Diff line
@@ -416,6 +416,7 @@ public class CallAudioRouteControllerTest extends TelecomTestCase {
    @Test
    public void testVideoCallRouteToSpeaker() {
        when(mCall.getVideoState()).thenReturn(VideoProfile.STATE_BIDIRECTIONAL);
        when(mCall.isActive()).thenReturn(true);
        mController.initialize();
        mController.sendMessageWithSessionInfo(SWITCH_FOCUS, ACTIVE_FOCUS, 0);
        // Verify that pending audio destination route is set to speaker. This will trigger pending