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

Commit cd86f981 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

audio policy: fix call audio switching from BT SCO to earpiece am: 8f2f4e91

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/14600572

Change-Id: Ifb53377ec4cb52671080f76ee5d779ccc3924e02
parents 4e28ea75 8f2f4e91
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -186,6 +186,12 @@ void Engine::filterOutputDevicesForStrategy(legacy_strategy strategy,
                 (primaryOutput->getPolicyAudioPort()->getModuleVersionMajor() < 3))) {
                availableOutputDevices = availPrimaryOutputDevices;
            }

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