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

Commit 9ff735f9 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-team Robot
Browse files

audio policy: fix VoIP audio switching from BT SCO to earpiece

commit 8f2f4e91 fixed b/188020987 but just for Cell calls.
This CL completes the fix for VoIP calls.

Bug: 188752649
Test: Cell and VoIP calls over earpiece and Bluetooth
Change-Id: I6a5563d9e802e664d4824b8f3c19a187529a17d7
(cherry picked from commit 97cec6f8)
parent 3346aa3b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -187,8 +187,10 @@ void Engine::filterOutputDevicesForStrategy(legacy_strategy strategy,
                availableOutputDevices = availPrimaryOutputDevices;
            }

        }
        // Do not use A2DP devices when in call but use them when not in call
        // (e.g for voice mail playback)
        if (isInCall()) {
            availableOutputDevices.remove(availableOutputDevices.getDevicesFromTypes({
                    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES,
                    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, }));