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

Commit ead7feef authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Revert "Remove default device selection logic that gives top priority to connected hearing aids."

This reverts commit 208cfff3.

We must wait for the blocking issue b/265294220 to be fixed before merging this one

Change-Id: I9d928ecc2cbfd7e325397d59b9d7ae532f07b408
parent 208cfff3
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -273,15 +273,10 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,
        break;

    case STRATEGY_PHONE: {
        // TODO(b/243670205): remove this logic that gives preference to last removable devices
        // once a UX decision has been made
        devices = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_HEARING_AID);
        if (!devices.isEmpty()) break;
        devices = availableOutputDevices.getFirstDevicesFromTypes(
                        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
                            }));
                        getLastRemovableMediaDevices(GROUP_NONE, {AUDIO_DEVICE_OUT_BLE_HEADSET}));
        if (!devices.isEmpty()) break;
        devices = availableOutputDevices.getFirstDevicesFromTypes({
                AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, AUDIO_DEVICE_OUT_EARPIECE});