From fd8cecbee6843b444d56a1db40af76027e2b19f1 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 17 Oct 2012 17:49:41 -0700 Subject: 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 --- audio/AudioPolicyManagerBase.cpp | 4 ++-- 1 file 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; } -- cgit v1.1