diff options
author | Eric Laurent <elaurent@google.com> | 2014-09-25 14:11:47 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-09-25 16:44:07 -0700 |
commit | bb6c9a05840d924b502ce0f1868fca4881ada1ed (patch) | |
tree | aec6d28b7ab31fec27416c6e853c94c2eedfcd9b /media/libmedia/AudioSystem.cpp | |
parent | a935c76f96b066941b34f81c42b3fe9d00db98c5 (diff) | |
download | frameworks_av-bb6c9a05840d924b502ce0f1868fca4881ada1ed.zip frameworks_av-bb6c9a05840d924b502ce0f1868fca4881ada1ed.tar.gz frameworks_av-bb6c9a05840d924b502ce0f1868fca4881ada1ed.tar.bz2 |
audio: fix stream type for accessibility usage
Make sure that accessibility prompts are heard when
a ringtone is active by forcing stream type
to AUDIO_STREAM_RING when phone state is AUDIO_MODE_RINGTONE.
Bug: 17558149.
Change-Id: Ia3bead8052fca5cbf282c267f7b9b06014fef628
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 1742fbe..dda3657 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -939,6 +939,15 @@ status_t AudioSystem::releaseSoundTriggerSession(audio_session_t session) if (aps == 0) return PERMISSION_DENIED; return aps->releaseSoundTriggerSession(session); } + +audio_mode_t AudioSystem::getPhoneState() +{ + const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); + if (aps == 0) return AUDIO_MODE_INVALID; + return aps->getPhoneState(); +} + + // --------------------------------------------------------------------------- void AudioSystem::AudioPolicyServiceClient::binderDied(const wp<IBinder>& who __unused) |