diff options
| author | Mike Lockwood <lockwood@google.com> | 2012-04-06 09:41:32 -0700 |
|---|---|---|
| committer | Mike Lockwood <lockwood@google.com> | 2012-04-06 11:00:27 -0700 |
| commit | 9d5a4be05b6d51ebb768e5fbcfa27ed9a39269b3 (patch) | |
| tree | db59588972ac584c2a2ead8fb4037429bfc73183 /core/java/android/content/Intent.java | |
| parent | e7aff2998489dcf2baf731150ebb63a8e8c509cf (diff) | |
| download | frameworks_base-9d5a4be05b6d51ebb768e5fbcfa27ed9a39269b3.zip frameworks_base-9d5a4be05b6d51ebb768e5fbcfa27ed9a39269b3.tar.gz frameworks_base-9d5a4be05b6d51ebb768e5fbcfa27ed9a39269b3.tar.bz2 | |
Add Intents to notify when USB audio devices or accessories are attached
In this change, only the USB audio accessory support is implemented.
Change-Id: Id9b411319b07a96dc56649ca74cc5f3f89a55a7c
Signed-off-by: Mike Lockwood <lockwood@google.com>
Diffstat (limited to 'core/java/android/content/Intent.java')
| -rw-r--r-- | core/java/android/content/Intent.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 2a9f1af..736dd24 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2034,6 +2034,38 @@ public class Intent implements Parcelable, Cloneable { "android.intent.action.HDMI_AUDIO_PLUG"; /** + * Broadcast Action: A USB audio device was plugged in or unplugged. + * + * <p>The intent will have the following extra values: + * <ul> + * <li><em>state</em> - 0 for unplugged, 1 for plugged. </li> + * <li><em>card</em> - ALSA card number (integer) </li> + * <li><em>device</em> - ALSA device number (integer) </li> + * </ul> + * </ul> + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_USB_AUDIO_DEVICE_PLUG = + "android.intent.action.USB_AUDIO_DEVICE_PLUG"; + + /** + * Broadcast Action: A USB audio accessory was plugged in or unplugged. + * + * <p>The intent will have the following extra values: + * <ul> + * <li><em>state</em> - 0 for unplugged, 1 for plugged. </li> + * <li><em>card</em> - ALSA card number (integer) </li> + * <li><em>device</em> - ALSA device number (integer) </li> + * </ul> + * </ul> + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_USB_AUDIO_ACCESSORY_PLUG = + "android.intent.action.USB_AUDIO_ACCESSORY_PLUG"; + + /** * <p>Broadcast Action: The user has switched on advanced settings in the settings app:</p> * <ul> * <li><em>state</em> - A boolean value indicating whether the settings is on or off.</li> |
