summaryrefslogtreecommitdiffstats
path: root/media/java
diff options
context:
space:
mode:
Diffstat (limited to 'media/java')
-rw-r--r--media/java/android/media/AudioService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index a64158f..3bee906 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -314,6 +314,7 @@ public class AudioService extends IAudioService.Stub {
intentFilter.addAction(Intent.ACTION_DOCK_EVENT);
intentFilter.addAction(Intent.ACTION_USB_ANLG_HEADSET_PLUG);
intentFilter.addAction(Intent.ACTION_USB_DGTL_HEADSET_PLUG);
+ intentFilter.addAction(Intent.ACTION_HDMI_AUDIO_PLUG);
context.registerReceiver(mReceiver, intentFilter);
// Register for media button intent broadcasts.
@@ -1949,7 +1950,8 @@ public class AudioService extends IAudioService.Stub {
AudioSystem.DEVICE_STATE_AVAILABLE, "");
mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET), "");
}
- } else if (action.equals(Intent.ACTION_USB_DGTL_HEADSET_PLUG)) {
+ } else if ( (action.equals(Intent.ACTION_USB_DGTL_HEADSET_PLUG)) ||
+ (action.equals(Intent.ACTION_HDMI_AUDIO_PLUG)) ) {
int state = intent.getIntExtra("state", 0);
Log.v(TAG, "Broadcast Receiver: Got ACTION_USB_DGTL_HEADSET_PLUG, state = "+state);
boolean isConnected = mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET);