commit | 6d66b3718e197236d1cade6ace9e69ffc93fadc2 | [log] [tgz] |
---|---|---|
author | jiabin <jiabin@google.com> | Mon Nov 25 20:04:29 2024 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Mon Nov 25 20:04:29 2024 +0000 |
tree | dd55ff9477718238490b78072375c0a272761273 | |
parent | b5147053c5cb802ccddce73fd4d2089be6ecc4fd [diff] [blame] |
Do not include selected output in secondary output list. Bug: 380006470 Test: repro steps in bug Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6838cdade7dd8fdd410ae97234503f1d2a3df24d) Merged-In: I629303ad5ee2e2ddf3f65edc9875e310d8048b21 Change-Id: I629303ad5ee2e2ddf3f65edc9875e310d8048b21
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index 354c59c..74e77e8 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -1492,7 +1492,8 @@ for (auto &secondaryMix : secondaryMixes) { sp<SwAudioOutputDescriptor> outputDesc = secondaryMix->getOutput(); if (outputDesc != nullptr && - outputDesc->mIoHandle != AUDIO_IO_HANDLE_NONE) { + outputDesc->mIoHandle != AUDIO_IO_HANDLE_NONE && + outputDesc->mIoHandle != *output) { secondaryOutputs->push_back(outputDesc->mIoHandle); weakSecondaryOutputDescs.push_back(outputDesc); } @@ -7432,7 +7433,8 @@ for (auto &secondaryMix : secondaryMixes) { sp<SwAudioOutputDescriptor> outputDesc = secondaryMix->getOutput(); if (outputDesc != nullptr && - outputDesc->mIoHandle != AUDIO_IO_HANDLE_NONE) { + outputDesc->mIoHandle != AUDIO_IO_HANDLE_NONE && + outputDesc != outputDescriptor) { secondaryDescs.push_back(outputDesc); } }