summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-02-04 16:28:31 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2013-02-11 10:23:13 -0800
commitdc3bf1a37425697277f6ed04fc8cfe4a52fd678a (patch)
tree334f0eaf23e510915f96287063240dd418de977b /include
parent60758e27a4be8fc9ac1180f8a4055234e1702cc9 (diff)
downloadhardware_libhardware_legacy-dc3bf1a37425697277f6ed04fc8cfe4a52fd678a.zip
hardware_libhardware_legacy-dc3bf1a37425697277f6ed04fc8cfe4a52fd678a.tar.gz
hardware_libhardware_legacy-dc3bf1a37425697277f6ed04fc8cfe4a52fd678a.tar.bz2
Identify remote stream activity, used for notification routing
Add support for checking remote stream activity. Don't route notifications like media when media active remotely. Add remote stream activity query in audio policy HAL. Bug 7485803 Change-Id: Ifb722c7f9ffbfbdc877fec5156bcfc09bec40651
Diffstat (limited to 'include')
-rw-r--r--include/hardware_legacy/AudioPolicyInterface.h1
-rw-r--r--include/hardware_legacy/AudioPolicyManagerBase.h6
2 files changed, 6 insertions, 1 deletions
diff --git a/include/hardware_legacy/AudioPolicyInterface.h b/include/hardware_legacy/AudioPolicyInterface.h
index 51f4822..d2dd430 100644
--- a/include/hardware_legacy/AudioPolicyInterface.h
+++ b/include/hardware_legacy/AudioPolicyInterface.h
@@ -157,6 +157,7 @@ public:
virtual status_t setEffectEnabled(int id, bool enabled) = 0;
virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const = 0;
+ virtual bool isStreamActiveRemotely(int stream, uint32_t inPastMs = 0) const = 0;
virtual bool isSourceActive(audio_source_t source) const = 0;
//dump state
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h
index b175670..98594d6 100644
--- a/include/hardware_legacy/AudioPolicyManagerBase.h
+++ b/include/hardware_legacy/AudioPolicyManagerBase.h
@@ -133,6 +133,10 @@ public:
virtual status_t setEffectEnabled(int id, bool enabled);
virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const;
+ // return whether a stream is playing remotely, override to change the definition of
+ // local/remote playback, used for instance by notification manager to not make
+ // media players lose audio focus when not playing locally
+ virtual bool isStreamActiveRemotely(int stream, uint32_t inPastMs = 0) const;
virtual bool isSourceActive(audio_source_t source) const;
virtual status_t dump(int fd);
@@ -241,7 +245,7 @@ protected:
status_t dump(int fd);
- audio_devices_t device();
+ audio_devices_t device() const;
void changeRefCount(AudioSystem::stream_type, int delta);
uint32_t refCount();
uint32_t strategyRefCount(routing_strategy strategy);