summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp10
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();