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

Commit c7edb74d authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: play alarms over LE broadcast device

Bug: 329172830
Test: start LE broadcast and play alarm
Flag: EXEMPT bug fix
Change-Id: Ifa9c945e2a73d2e7b0718b7c610dbc9d7940aeec
parent 311daa69
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -428,10 +428,12 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,

        // LE audio broadcast device is only used if:
        // - No call is active
        // - either MEDIA or SONIFICATION_RESPECTFUL is the highest priority active strategy
        // - either MEDIA, SONIFICATION_RESPECTFUL or SONIFICATION is the highest priority
        // active strategy
        // OR the LE audio unicast device is not active
        if (devices2.isEmpty() && !isInCall()
                && (strategy == STRATEGY_MEDIA || strategy == STRATEGY_SONIFICATION_RESPECTFUL)) {
                && (strategy == STRATEGY_MEDIA || strategy == STRATEGY_SONIFICATION_RESPECTFUL
                      || strategy == STRATEGY_SONIFICATION)) {
            legacy_strategy topActiveStrategy = STRATEGY_NONE;
            for (const auto &ps : getOrderedProductStrategies()) {
                if (outputs.isStrategyActive(ps)) {
@@ -443,6 +445,7 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,

            if (topActiveStrategy == STRATEGY_NONE || topActiveStrategy == STRATEGY_MEDIA
                    || topActiveStrategy == STRATEGY_SONIFICATION_RESPECTFUL
                    || topActiveStrategy == STRATEGY_SONIFICATION
                    || !outputs.isAnyDeviceTypeActive(getAudioDeviceOutLeAudioUnicastSet())) {
                devices2 =
                        availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_BLE_BROADCAST);