Loading services/audiopolicy/enginedefault/src/Engine.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -276,10 +276,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}); Loading Loading
services/audiopolicy/enginedefault/src/Engine.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -276,10 +276,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}); Loading