diff options
author | Eric Laurent <elaurent@google.com> | 2010-01-25 10:27:15 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-01-25 10:27:15 -0800 |
commit | 787aa597d497ffd3019fb64c244a1e944a5f8453 (patch) | |
tree | bcdb86dbebcef6fc6b394ea032091f4220c6e7f5 /media | |
parent | 111d0367d75e0bba6558e4464a7662dc95825ba4 (diff) | |
download | frameworks_base-787aa597d497ffd3019fb64c244a1e944a5f8453.zip frameworks_base-787aa597d497ffd3019fb64c244a1e944a5f8453.tar.gz frameworks_base-787aa597d497ffd3019fb64c244a1e944a5f8453.tar.bz2 |
Fix issue 2363154: Speech synthesis fails to start over A2DP after media server process crash.
The problem is that after a media_server crash, the value of the A2DP output handle can change.
As this value is cached in AudioSystem for all client processes there can be a mismatch between the cached
and actual value after a media_server restart.
The fix consists in clearing the cached output handles and output to stream map values cached
in AudioSystem in AudioFlingerClient::binderDied() which is called when the media_server crashes.
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 5352234..e1b1776 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -348,6 +348,9 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who) { Mutex::Autolock _l(AudioSystem::gLock); AudioSystem::gAudioFlinger.clear(); + // clear output handles and stream to output map caches + AudioSystem::gStreamOutputMap.clear(); + AudioSystem::gOutputs.clear(); if (gAudioErrorCallback) { gAudioErrorCallback(DEAD_OBJECT); |