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

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

Merge "Revert "Revert "Remove default device selection logic that gives top...

Merge "Revert "Revert "Remove default device selection logic that gives top priority to connected hearing aids.""" into tm-qpr-dev am: 850d75e1

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



Change-Id: I847cd2e90684f3c544f03ac988ac78c8d5d789fd
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8b35aee8 850d75e1
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -273,10 +273,15 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,
        break;

    case STRATEGY_PHONE: {
        devices = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_HEARING_AID);
        if (!devices.isEmpty()) break;
        // TODO(b/243670205): remove this logic that gives preference to last removable devices
        // once a UX decision has been made
        devices = availableOutputDevices.getFirstDevicesFromTypes(
                        getLastRemovableMediaDevices(GROUP_NONE, {AUDIO_DEVICE_OUT_BLE_HEADSET}));
                        getLastRemovableMediaDevices(GROUP_NONE, {
                            // excluding HEARING_AID and BLE_HEADSET because Dialer uses
                            // setCommunicationDevice to select them explicitly
                            AUDIO_DEVICE_OUT_HEARING_AID,
                            AUDIO_DEVICE_OUT_BLE_HEADSET
                            }));
        if (!devices.isEmpty()) break;
        devices = availableOutputDevices.getFirstDevicesFromTypes({
                AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, AUDIO_DEVICE_OUT_EARPIECE});