diff options
author | Eric Laurent <elaurent@google.com> | 2014-12-08 19:36:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-08 19:36:01 +0000 |
commit | b156888dcd2f8b3b05d724a31ec1c48da322fdc1 (patch) | |
tree | 0aa0bdd0cd3254f43d7b388c81abcbd759d66926 /services/audiopolicy | |
parent | e4fe1b62b37eefe8b88aeeea896d2b3851d32480 (diff) | |
parent | 427aca5bebaacfd5639b85661689ebd554bd0822 (diff) | |
download | frameworks_av-b156888dcd2f8b3b05d724a31ec1c48da322fdc1.zip frameworks_av-b156888dcd2f8b3b05d724a31ec1c48da322fdc1.tar.gz frameworks_av-b156888dcd2f8b3b05d724a31ec1c48da322fdc1.tar.bz2 |
am 427aca5b: am 18265202: Merge "audio policy: fix inifinite loop in clearAudioPatches()" into lmp-mr1-dev
* commit '427aca5bebaacfd5639b85661689ebd554bd0822':
audio policy: fix inifinite loop in clearAudioPatches()
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index 3778704..8bb35f9 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -2650,13 +2650,10 @@ status_t AudioPolicyManager::setAudioPortConfig(const struct audio_port_config * void AudioPolicyManager::clearAudioPatches(uid_t uid) { - for (ssize_t i = 0; i < (ssize_t)mAudioPatches.size(); i++) { + for (ssize_t i = (ssize_t)mAudioPatches.size() - 1; i >= 0; i--) { sp<AudioPatch> patchDesc = mAudioPatches.valueAt(i); if (patchDesc->mUid == uid) { - // releaseAudioPatch() removes the patch from mAudioPatches - if (releaseAudioPatch(mAudioPatches.keyAt(i), uid) == NO_ERROR) { - i--; - } + releaseAudioPatch(mAudioPatches.keyAt(i), uid); } } } |