diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-02-04 16:26:02 -0800 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-02-11 10:13:00 -0800 |
commit | 272ab546940054ad7991bef4b3a36f15175721cd (patch) | |
tree | 32635746bbb3c6f4b4297754d0d388fae41c6574 /media/libmedia/AudioSystem.cpp | |
parent | 513b8b238caa52f8ddf5c85109dbf362c515185f (diff) | |
download | frameworks_av-272ab546940054ad7991bef4b3a36f15175721cd.zip frameworks_av-272ab546940054ad7991bef4b3a36f15175721cd.tar.gz frameworks_av-272ab546940054ad7991bef4b3a36f15175721cd.tar.bz2 |
Add support for querying if a stream is active remotely
Bug 7485803
Change-Id: I0744374f130fd2dd0714102354cffed2fa915361
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 028e4a3..693df60 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -731,6 +731,16 @@ status_t AudioSystem::isStreamActive(audio_stream_type_t stream, bool* state, ui return NO_ERROR; } +status_t AudioSystem::isStreamActiveRemotely(audio_stream_type_t stream, bool* state, + uint32_t inPastMs) +{ + const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); + if (aps == 0) return PERMISSION_DENIED; + if (state == NULL) return BAD_VALUE; + *state = aps->isStreamActiveRemotely(stream, inPastMs); + return NO_ERROR; +} + status_t AudioSystem::isSourceActive(audio_source_t stream, bool* state) { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); |