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

Commit 13b1b987 authored by Carter Hsu's avatar Carter Hsu Committed by Automerger Merge Worker
Browse files

Merge "Revert "audio: prefer STRATEGY_SONIFICATION when ringotne is active""...

Merge "Revert "audio: prefer STRATEGY_SONIFICATION when ringotne is active"" into sc-dev am: 74dcdac0

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

Change-Id: Ica11d5b432d8b89d696bc65c6446b3625c7dbc8d
parents 56fd7efb 74dcdac0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -5849,12 +5849,11 @@ DeviceVector AudioPolicyManager::getNewOutputDevices(const sp<SwAudioOutputDescr
        // With low-latency playing on speaker, music on WFD, when the first low-latency
        // output is stopped, getNewOutputDevices checks for a product strategy
        // from the list, as STRATEGY_SONIFICATION comes prior to STRATEGY_MEDIA.
        // If an ALARM, RING or ENFORCED_AUDIBLE stream is supported by the product strategy,
        // If an ALARM or ENFORCED_AUDIBLE stream is supported by the product strategy,
        // devices are returned for STRATEGY_SONIFICATION without checking whether the
        // stream is associated to the output descriptor.
        if (doGetOutputDevicesForVoice() || outputDesc->isStrategyActive(productStrategy) ||
               ((hasStreamActive(AUDIO_STREAM_ALARM) ||
                hasStreamActive(AUDIO_STREAM_RING) ||
                hasStreamActive(AUDIO_STREAM_ENFORCED_AUDIBLE)) &&
                mOutputs.isStrategyActiveOnSameModule(productStrategy, outputDesc))) {
            // Retrieval of devices for voice DL is done on primary output profile, cannot