summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-05-07 09:10:01 -0700
committerEric Laurent <elaurent@google.com>2014-05-07 09:10:01 -0700
commit5b61dddd0dba28922068da2487894761486aec6c (patch)
tree068b24eb9da2b95f25f4954e43e8bccb25097f76 /services/audiopolicy
parent5e0e2316578b8b9eccdf4002951d6e9cd96adaac (diff)
downloadframeworks_av-5b61dddd0dba28922068da2487894761486aec6c.zip
frameworks_av-5b61dddd0dba28922068da2487894761486aec6c.tar.gz
frameworks_av-5b61dddd0dba28922068da2487894761486aec6c.tar.bz2
audio policy: fix typo in AudioPolicyManager constructor
Fix cut/paste error in new AudioPolicyManager constructor causing the same index variable to be reused in nested for loops. Change-Id: Id57ff19bf6dd8974486b07c8252029e377df2747
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 11490c3..fc9b81a 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -1686,10 +1686,10 @@ AudioPolicyManager::AudioPolicyManager(AudioPolicyClientInterface *clientInterfa
mHwModules[i]->mName);
delete outputDesc;
} else {
- for (size_t i = 0; i < outProfile->mSupportedDevices.size(); i++) {
- audio_devices_t type = outProfile->mSupportedDevices[i]->mType;
+ for (size_t k = 0; k < outProfile->mSupportedDevices.size(); k++) {
+ audio_devices_t type = outProfile->mSupportedDevices[k]->mType;
ssize_t index =
- mAvailableOutputDevices.indexOf(outProfile->mSupportedDevices[i]);
+ mAvailableOutputDevices.indexOf(outProfile->mSupportedDevices[k]);
// give a valid ID to an attached device once confirmed it is reachable
if ((index >= 0) && (mAvailableOutputDevices[index]->mId == 0)) {
mAvailableOutputDevices[index]->mId = nextUniqueId();
@@ -1731,10 +1731,10 @@ AudioPolicyManager::AudioPolicyManager(AudioPolicyClientInterface *clientInterfa
&inputDesc->mChannelMask);
if (input != 0) {
- for (size_t i = 0; i < inProfile->mSupportedDevices.size(); i++) {
- audio_devices_t type = inProfile->mSupportedDevices[i]->mType;
+ for (size_t k = 0; k < inProfile->mSupportedDevices.size(); k++) {
+ audio_devices_t type = inProfile->mSupportedDevices[k]->mType;
ssize_t index =
- mAvailableInputDevices.indexOf(inProfile->mSupportedDevices[i]);
+ mAvailableInputDevices.indexOf(inProfile->mSupportedDevices[k]);
// give a valid ID to an attached device once confirmed it is reachable
if ((index >= 0) && (mAvailableInputDevices[index]->mId == 0)) {
mAvailableInputDevices[index]->mId = nextUniqueId();