summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-02-04 16:26:02 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2013-02-11 10:13:00 -0800
commit272ab546940054ad7991bef4b3a36f15175721cd (patch)
tree32635746bbb3c6f4b4297754d0d388fae41c6574 /services
parent513b8b238caa52f8ddf5c85109dbf362c515185f (diff)
downloadframeworks_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 'services')
-rw-r--r--services/audioflinger/AudioPolicyService.cpp9
-rw-r--r--services/audioflinger/AudioPolicyService.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index b86d3ae..4256fc4 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -484,6 +484,15 @@ bool AudioPolicyService::isStreamActive(audio_stream_type_t stream, uint32_t inP
return mpAudioPolicy->is_stream_active(mpAudioPolicy, stream, inPastMs);
}
+bool AudioPolicyService::isStreamActiveRemotely(audio_stream_type_t stream, uint32_t inPastMs) const
+{
+ if (mpAudioPolicy == NULL) {
+ return 0;
+ }
+ Mutex::Autolock _l(mLock);
+ return mpAudioPolicy->is_stream_active_remotely(mpAudioPolicy, stream, inPastMs);
+}
+
bool AudioPolicyService::isSourceActive(audio_source_t source) const
{
if (mpAudioPolicy == NULL) {
diff --git a/services/audioflinger/AudioPolicyService.h b/services/audioflinger/AudioPolicyService.h
index 92653c1..35cf368 100644
--- a/services/audioflinger/AudioPolicyService.h
+++ b/services/audioflinger/AudioPolicyService.h
@@ -104,6 +104,7 @@ public:
virtual status_t unregisterEffect(int id);
virtual status_t setEffectEnabled(int id, bool enabled);
virtual bool isStreamActive(audio_stream_type_t stream, uint32_t inPastMs = 0) const;
+ virtual bool isStreamActiveRemotely(audio_stream_type_t stream, uint32_t inPastMs = 0) const;
virtual bool isSourceActive(audio_source_t source) const;
virtual status_t queryDefaultPreProcessing(int audioSession,