diff options
author | Eric Laurent <elaurent@google.com> | 2012-10-17 17:49:41 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2012-10-17 17:49:41 -0700 |
commit | fd8cecbee6843b444d56a1db40af76027e2b19f1 (patch) | |
tree | 7a934b8381756b4c216ae37cac453800f675aadf /audio | |
parent | 772686310a3bc44d93591349e174a60360a3d30d (diff) | |
download | hardware_libhardware_legacy-fd8cecbee6843b444d56a1db40af76027e2b19f1.zip hardware_libhardware_legacy-fd8cecbee6843b444d56a1db40af76027e2b19f1.tar.gz hardware_libhardware_legacy-fd8cecbee6843b444d56a1db40af76027e2b19f1.tar.bz2 |
audio policy: fix scanning of supported devices
Fix is a bug in checkOutputsForDevice() which makes that we can
try to reopen an output stream after a new device is connected because
we believe that no opened output is available for this device.
Bug 7369475.
Change-Id: I2290a9b5ba102657cda495fbb8a995e0003b883a
Diffstat (limited to 'audio')
-rw-r--r-- | audio/AudioPolicyManagerBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index 4682e39..d50965f 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -1611,13 +1611,13 @@ status_t AudioPolicyManagerBase::checkOutputsForDevice(audio_devices_t device, // nothing to do if one output is already opened for this profile size_t j; - for (j = 0; j < outputs.size(); j++) { + for (j = 0; j < mOutputs.size(); j++) { desc = mOutputs.valueAt(j); if (!desc->isDuplicated() && desc->mProfile == profile) { break; } } - if (j != outputs.size()) { + if (j != mOutputs.size()) { continue; } |