diff options
author | Eric Laurent <elaurent@google.com> | 2015-01-15 14:33:51 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-01-15 18:56:26 -0800 |
commit | aa79befb301bc3451a19021b3fc9e9e6a1f231e8 (patch) | |
tree | d55a9b5ccde8671e9126ced03a963a70891ae1e8 /services/audiopolicy | |
parent | 5f3194c9efeadc200c89d9e2b00a19f1afeac55d (diff) | |
download | frameworks_av-aa79befb301bc3451a19021b3fc9e9e6a1f231e8.zip frameworks_av-aa79befb301bc3451a19021b3fc9e9e6a1f231e8.tar.gz frameworks_av-aa79befb301bc3451a19021b3fc9e9e6a1f231e8.tar.bz2 |
fix audio patch leak.
Always wait for status when executing a create audio patch
command in audio policy service command thread.
The returned patch handle must be passed back to audio policy manager
so that the patch can be modified later.
Failing to do so causes a leak of patch descriptors in audio flinger.
Bug: 19032387.
Change-Id: I5462d1437fac244d9c5e38f2c7b8e1a4c01d2b75
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyService.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/audiopolicy/AudioPolicyService.cpp b/services/audiopolicy/AudioPolicyService.cpp index 8a9abc9..0955e10 100644 --- a/services/audiopolicy/AudioPolicyService.cpp +++ b/services/audiopolicy/AudioPolicyService.cpp @@ -907,8 +907,10 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(sp<AudioCommand>& c } removedCommands.clear(); - // Disable wait for status if delay is not 0 - if (delayMs != 0) { + // Disable wait for status if delay is not 0. + // Except for create audio patch command because the returned patch handle + // is needed by audio policy manager + if (delayMs != 0 && command->mCommand != CREATE_AUDIO_PATCH) { command->mWaitStatus = false; } |