Skip to content

Commit 079f09c

Browse files
Eric LaurentAndroid (Google) Code Review
authored andcommitted
Merge "Added support for USB audio devices"
2 parents d140446 + 59f4827 commit 079f09c

File tree

5 files changed

+102
-130
lines changed

5 files changed

+102
-130
lines changed

core/java/android/content/Intent.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,8 +2000,8 @@ public static Intent createChooser(Intent target, CharSequence title) {
20002000
* @hide
20012001
*/
20022002
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
2003-
public static final String ACTION_USB_ANLG_HEADSET_PLUG =
2004-
"android.intent.action.USB_ANLG_HEADSET_PLUG";
2003+
public static final String ACTION_ANALOG_AUDIO_DOCK_PLUG =
2004+
"android.intent.action.ANALOG_AUDIO_DOCK_PLUG";
20052005

20062006
/**
20072007
* Broadcast Action: A digital audio speaker/headset plugged in or unplugged.
@@ -2015,8 +2015,8 @@ public static Intent createChooser(Intent target, CharSequence title) {
20152015
* @hide
20162016
*/
20172017
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
2018-
public static final String ACTION_USB_DGTL_HEADSET_PLUG =
2019-
"android.intent.action.USB_DGTL_HEADSET_PLUG";
2018+
public static final String ACTION_DIGITAL_AUDIO_DOCK_PLUG =
2019+
"android.intent.action.DIGITAL_AUDIO_DOCK_PLUG";
20202020

20212021
/**
20222022
* Broadcast Action: A HMDI cable was plugged or unplugged
@@ -2034,7 +2034,7 @@ public static Intent createChooser(Intent target, CharSequence title) {
20342034
"android.intent.action.HDMI_AUDIO_PLUG";
20352035

20362036
/**
2037-
* Broadcast Action: A USB audio device was plugged in or unplugged.
2037+
* Broadcast Action: A USB audio accessory was plugged in or unplugged.
20382038
*
20392039
* <p>The intent will have the following extra values:
20402040
* <ul>
@@ -2046,11 +2046,11 @@ public static Intent createChooser(Intent target, CharSequence title) {
20462046
* @hide
20472047
*/
20482048
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
2049-
public static final String ACTION_USB_AUDIO_DEVICE_PLUG =
2050-
"android.intent.action.USB_AUDIO_DEVICE_PLUG";
2049+
public static final String ACTION_USB_AUDIO_ACCESSORY_PLUG =
2050+
"android.intent.action.USB_AUDIO_ACCESSORY_PLUG";
20512051

20522052
/**
2053-
* Broadcast Action: A USB audio accessory was plugged in or unplugged.
2053+
* Broadcast Action: A USB audio device was plugged in or unplugged.
20542054
*
20552055
* <p>The intent will have the following extra values:
20562056
* <ul>
@@ -2062,8 +2062,8 @@ public static Intent createChooser(Intent target, CharSequence title) {
20622062
* @hide
20632063
*/
20642064
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
2065-
public static final String ACTION_USB_AUDIO_ACCESSORY_PLUG =
2066-
"android.intent.action.USB_AUDIO_ACCESSORY_PLUG";
2065+
public static final String ACTION_USB_AUDIO_DEVICE_PLUG =
2066+
"android.intent.action.USB_AUDIO_DEVICE_PLUG";
20672067

20682068
/**
20692069
* <p>Broadcast Action: The user has switched on advanced settings in the settings app:</p>

media/java/android/media/AudioManager.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,6 +2237,14 @@ public boolean isSilentMode() {
22372237
* docking station
22382238
*/
22392239
public static final int DEVICE_OUT_DGTL_DOCK_HEADSET = AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET;
2240+
/** {@hide} The audio output device code for a USB audio accessory. The accessory is in USB host
2241+
* mode and the Android device in USB device mode
2242+
*/
2243+
public static final int DEVICE_OUT_USB_ACCESSORY = AudioSystem.DEVICE_OUT_USB_ACCESSORY;
2244+
/** {@hide} The audio output device code for a USB audio device. The device is in USB device
2245+
* mode and the Android device in USB host mode
2246+
*/
2247+
public static final int DEVICE_OUT_USB_DEVICE = AudioSystem.DEVICE_OUT_USB_DEVICE;
22402248
/** {@hide} This is not used as a returned value from {@link #getDevicesForStream}, but could be
22412249
* used in the future in a set method to select whatever default device is chosen by the
22422250
* platform-specific implementation.

0 commit comments

Comments
 (0)