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

Commit 0629cc56 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "Select correct devices when ENFORCED_AUDIBLE is set"

am: 982ecd07

Change-Id: If320a44736d76fb737b02430842e5336bc13ef9a
parents 139b5728 982ecd07
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)) {