commit | a045bd0ca8e879d3a0ea2632b7083afb3885325e | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Wed Jun 24 20:01:40 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jun 24 20:01:40 2020 +0000 |
tree | 590d6490fd1fccdfbcd474efbbaf4d3024f27202 | |
parent | a5b0a979b01e2bd13d8f94f110d8eb268fbb5215 [diff] | |
parent | 685a6ab761ed1dd8d94dbbe872ee4904a7908ad3 [diff] |
Merge "audio policy: do not consider telephony TX device as a local device" into rvc-dev am: 8847f120b6 am: 685a6ab761 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/11931587 Change-Id: Ia2d3c23922f37543eacd2cf85d0bf6bd604cb140
diff --git a/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp b/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp index d5272bc..d6d472b 100644 --- a/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp +++ b/services/audiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
@@ -690,7 +690,9 @@ const sp<SwAudioOutputDescriptor> outputDesc = this->valueAt(i); if (outputDesc->isActive(volumeSource, inPastMs, sysTime) && (!(outputDesc->devices() - .containsDeviceAmongTypes(getAllOutRemoteDevices())))) { + .containsDeviceAmongTypes(getAllOutRemoteDevices()) + || outputDesc->devices() + .onlyContainsDevicesWithType(AUDIO_DEVICE_OUT_TELEPHONY_TX)))) { return true; } } @@ -722,7 +724,11 @@ const sp<SwAudioOutputDescriptor> otherDesc = valueAt(i); if (desc->sharesHwModuleWith(otherDesc) && otherDesc->isStrategyActive(ps, inPastMs, sysTime)) { - return true; + if (desc == otherDesc + || !otherDesc->devices() + .onlyContainsDevicesWithType(AUDIO_DEVICE_OUT_TELEPHONY_TX)) { + return true; + } } } return false;