summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-03-26 14:23:58 -0400
committerJohn Spurlock <jspurlock@google.com>2015-03-26 14:35:11 -0400
commit8a52c4491dfbb8354a92c0a1e6abc86848e187c6 (patch)
tree1f5b3febe6f11ec39cf48490025529b0b56670e6 /media
parent221d2cbf2f418be8de22f5cf3d79a25be1b8d1be (diff)
downloadframeworks_base-8a52c4491dfbb8354a92c0a1e6abc86848e187c6.zip
frameworks_base-8a52c4491dfbb8354a92c0a1e6abc86848e187c6.tar.gz
frameworks_base-8a52c4491dfbb8354a92c0a1e6abc86848e187c6.tar.bz2
AudioService: Observe changes to output devices per-stream.
- Keep track of calls to AudioSystem.getDevicesForStream. - Report device changes for the base streams to the binary event log. - Fire internal intent so volume UI can respond to changes. - Update devices when new routes are reported. Bug: 19618959 Change-Id: I7bbd497b178d9829accc19e6c951a711aef8590c
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioManager.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 28941b9..cb70e8b 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -134,6 +134,22 @@ public class AudioManager {
public static final String VOLUME_CHANGED_ACTION = "android.media.VOLUME_CHANGED_ACTION";
/**
+ * @hide Broadcast intent when the devices for a particular stream type changes.
+ * Includes the stream, the new devices and previous devices.
+ * Notes:
+ * - for internal platform use only, do not make public,
+ * - never used for "remote" volume changes
+ *
+ * @see #EXTRA_VOLUME_STREAM_TYPE
+ * @see #EXTRA_VOLUME_STREAM_DEVICES
+ * @see #EXTRA_PREV_VOLUME_STREAM_DEVICES
+ * @see #getDevicesForStream
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String STREAM_DEVICES_CHANGED_ACTION =
+ "android.media.STREAM_DEVICES_CHANGED_ACTION";
+
+ /**
* @hide Broadcast intent when a stream mute state changes.
* Includes the stream that changed and the new mute state
*
@@ -196,6 +212,18 @@ public class AudioManager {
"android.media.EXTRA_PREV_VOLUME_STREAM_VALUE";
/**
+ * @hide The devices associated with the stream for the stream devices changed intent.
+ */
+ public static final String EXTRA_VOLUME_STREAM_DEVICES =
+ "android.media.EXTRA_VOLUME_STREAM_DEVICES";
+
+ /**
+ * @hide The previous devices associated with the stream for the stream devices changed intent.
+ */
+ public static final String EXTRA_PREV_VOLUME_STREAM_DEVICES =
+ "android.media.EXTRA_PREV_VOLUME_STREAM_DEVICES";
+
+ /**
* @hide The new master volume mute state for the master mute changed intent.
* Value is boolean
*/