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
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 @@
// 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;
}