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

Commit 3e7eb5eb authored by Yung Ti Su's avatar Yung Ti Su
Browse files

audiopolicy: fix for ringtone and offload music playback concurrency

Root cause: music output is still active when setphonestate and will be
reevaluate routing and change back to normal speaker.

follow the change of https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/av/+/4292147



Bug: 110072502
Test: self-tested over 30 times.

Change-Id: Iec1c85f9cd24e3eae149fa27ad8d1ec2b23019e0
Signed-off-by: default avatarYung Ti Su <andysu@google.com>
parent c22b754f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4842,7 +4842,7 @@ audio_devices_t AudioPolicyManager::getNewOutputDevice(const sp<AudioOutputDescr
    } else if (isInCall() ||
               isStrategyActiveOnSameModule(outputDesc, STRATEGY_PHONE)) {
        device = getDeviceForStrategy(STRATEGY_PHONE, fromCache);
    } else if (isStrategyActive(outputDesc, STRATEGY_SONIFICATION)) {
    } else if (isStrategyActiveOnSameModule(outputDesc, STRATEGY_SONIFICATION)) {
        device = getDeviceForStrategy(STRATEGY_SONIFICATION, fromCache);
    } else if (isStrategyActive(outputDesc, STRATEGY_ENFORCED_AUDIBLE)) {
        device = getDeviceForStrategy(STRATEGY_ENFORCED_AUDIBLE, fromCache);