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

Commit 019c1737 authored by Henrik Backlund's avatar Henrik Backlund Committed by Tomoharu Kasahara
Browse files

Select correct devices when ENFORCED_AUDIBLE is set

If ENFORCED_AUDIBLE is set for a stream, it should output
to Speaker and not select output device(s) for VOICE_CALL.

Bug: 147209610

Change-Id: I9553efd677979351ed6f7191079da84dac2a7ed1
parent 3eef87ec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5291,7 +5291,8 @@ DeviceVector AudioPolicyManager::getNewOutputDevices(const sp<SwAudioOutputDescr
        auto attr = mEngine->getAllAttributesForProductStrategy(productStrategy).front();

        if ((hasVoiceStream(streams) &&
             (isInCall() || mOutputs.isStrategyActiveOnSameModule(productStrategy, outputDesc))) ||
             (isInCall() || mOutputs.isStrategyActiveOnSameModule(productStrategy, outputDesc)) &&
             !isStreamActive(AUDIO_STREAM_ENFORCED_AUDIBLE, 0)) ||
             ((hasStream(streams, AUDIO_STREAM_ALARM) || hasStream(streams, AUDIO_STREAM_ENFORCED_AUDIBLE)) &&
                mOutputs.isStrategyActiveOnSameModule(productStrategy, outputDesc)) ||
                outputDesc->isStrategyActive(productStrategy)) {