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
gugelfrei
Henrik Backlund 5 years ago committed by Tomoharu Kasahara
parent 3eef87ec4e
commit 019c1737ed

@ -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)) {

Loading…
Cancel
Save