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

Commit 13ed8e37 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Automerger Merge Worker
Browse files

Merge "Favor dock over speaker combination for SONIFICATION" into tm-qpr-dev am: ff8e6031

parents e3deb75c ff8e6031
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -291,7 +291,9 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,

        if ((strategy == STRATEGY_SONIFICATION) ||
                (getForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM) == AUDIO_POLICY_FORCE_SYSTEM_ENFORCED)) {
            devices = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_SPEAKER);
            // favor dock over speaker when available
            devices = availableOutputDevices.getFirstDevicesFromTypes({
                    AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, AUDIO_DEVICE_OUT_SPEAKER});
        }

        // if SCO headset is connected and we are told to use it, play ringtone over