commit | 94af2ae5924ae004dbffa9d2d9728498fb9ac5cd | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Thu Oct 21 13:38:16 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Oct 21 13:38:16 2021 +0000 |
tree | 52bc411c360ff9a6176b96629efa50034876fd28 | |
parent | 162e19f2eff2bf34c3214db79b6543d9c35cf8b3 [diff] | |
parent | dac9e956f01f8e1e3799a764409a4e01a369d8a2 [diff] |
Merge "AudioPolicyManager: fix closure of output supporting more than on device" am: b1b4ddf70c am: 8e799747de am: dac9e956f0 Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1863726 Change-Id: Iec285dd357d45599ce92fbe04c8959ef2c86feda
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index cb9d700..9174445 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -5219,7 +5219,8 @@ if (!desc->isDuplicated()) { // exact match on device if (device_distinguishes_on_address(deviceType) && desc->supportsDevice(device) - && desc->containsSingleDeviceSupportingEncodedFormats(device)) { + && desc->containsSingleDeviceSupportingEncodedFormats(device) + && !mAvailableOutputDevices.containsAtLeastOne(desc->supportedDevices())) { outputs.add(mOutputs.keyAt(i)); } else if (!mAvailableOutputDevices.containsAtLeastOne(desc->supportedDevices())) { ALOGV("checkOutputsForDevice(): disconnecting adding output %d",