commit | 36c0118a6c36adbd248672960a08a432f8b71366 | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Thu Oct 21 14:10:37 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Oct 21 14:10:37 2021 +0000 |
tree | 6937d83dbfd0c0dcc37b63a006672d94c1c3ea24 | |
parent | 397435cb3e8fb9955a7691530aacb39187f09604 [diff] | |
parent | f687acb5cb237c831e3ba8cb7d566ea7fc060d2f [diff] |
Merge "AudioPolicyManager: fix closure of output supporting more than on device" am: b1b4ddf70c am: 8e799747de am: dac9e956f0 am: 94af2ae592 am: f687acb5cb Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1863726 Change-Id: Iac028910bc949f61caf5e8537fa6f7f71dd07092
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index a46da41..6221c05 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -5457,7 +5457,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",