diff options
author | Eric Laurent <elaurent@google.com> | 2014-12-19 11:49:08 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-12-19 12:01:31 -0800 |
commit | 2cbe89a82d4167c5d5bcf3024edc22ab6874143a (patch) | |
tree | a11134b8f4bda628079a21ed2d0e31923950cecb /services/audiopolicy | |
parent | d4b056da7cbf1adb2a5f668e4425def3754a9c09 (diff) | |
download | frameworks_av-2cbe89a82d4167c5d5bcf3024edc22ab6874143a.zip frameworks_av-2cbe89a82d4167c5d5bcf3024edc22ab6874143a.tar.gz frameworks_av-2cbe89a82d4167c5d5bcf3024edc22ab6874143a.tar.bz2 |
audio policy: improve accessibility routing
Force re-evaluating accessibility use case routing
when a condition affecting it (ringtone, alarm, call state)
is changing.
Bug: 18761698.
Change-Id: I42ac3a9fdc80bce11cf0a7fc76f680af4271abc9
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index a3389e0..be7158f 100644 --- a/services/audiopolicy/AudioPolicyManager.cpp +++ b/services/audiopolicy/AudioPolicyManager.cpp @@ -596,6 +596,9 @@ void AudioPolicyManager::setPhoneState(audio_mode_t state) } handleIncallSonification((audio_stream_type_t)stream, false, true); } + + // force reevaluating accessibility routing when call starts + mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY); } // store previous phone state for management of sonification strategy below @@ -1290,6 +1293,11 @@ status_t AudioPolicyManager::startOutput(audio_io_handle_t output, outputDesc->mPolicyMix->mRegistrationId); } + // force reevaluating accessibility routing when ringtone or alarm starts + if (strategy == STRATEGY_SONIFICATION) { + mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY); + } + if (waitMs > muteWaitMs) { usleep((waitMs - muteWaitMs) * 2 * 1000); } |