diff options
author | Mike Lockwood <lockwood@android.com> | 2011-02-28 13:18:02 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-02-28 13:18:02 -0800 |
commit | fc88f94fc32fc010b153af32dea8e1fd4bae1f19 (patch) | |
tree | d96d66b24c8c6dcbb8a1135f92090723c3970e2c /core | |
parent | 54e96c69d068593f1d5893be6067509b07abdadc (diff) | |
parent | 6da062a96c6f8126aad450a937144fab4333488f (diff) | |
download | frameworks_base-fc88f94fc32fc010b153af32dea8e1fd4bae1f19.zip frameworks_base-fc88f94fc32fc010b153af32dea8e1fd4bae1f19.tar.gz frameworks_base-fc88f94fc32fc010b153af32dea8e1fd4bae1f19.tar.bz2 |
am 6da062a9: Merge "DO NOT MERGE: Clean up USB notifications:" into gingerbread
* commit '6da062a96c6f8126aad450a937144fab4333488f':
DO NOT MERGE: Clean up USB notifications:
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/hardware/UsbManager.java | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/core/java/android/hardware/UsbManager.java b/core/java/android/hardware/UsbManager.java index eb394c1..18790d2 100644 --- a/core/java/android/hardware/UsbManager.java +++ b/core/java/android/hardware/UsbManager.java @@ -27,32 +27,12 @@ import java.io.IOException; */ public class UsbManager { /** - * Broadcast Action: A broadcast for USB connected events. - * - * The extras bundle will name/value pairs with the name of the function - * and a value of either {@link #USB_FUNCTION_ENABLED} or {@link #USB_FUNCTION_DISABLED}. - * Possible USB function names include {@link #USB_FUNCTION_MASS_STORAGE}, - * {@link #USB_FUNCTION_ADB}, {@link #USB_FUNCTION_RNDIS} and {@link #USB_FUNCTION_MTP}. - */ - public static final String ACTION_USB_CONNECTED = - "android.hardware.action.USB_CONNECTED"; - - /** - * Broadcast Action: A broadcast for USB disconnected events. - */ - public static final String ACTION_USB_DISCONNECTED = - "android.hardware.action.USB_DISCONNECTED"; - - /** * Broadcast Action: A sticky broadcast for USB state change events. * - * This is a sticky broadcast for clients that are interested in both USB connect and - * disconnect events. If you are only concerned with one or the other, you can use - * {@link #ACTION_USB_CONNECTED} or {@link #ACTION_USB_DISCONNECTED} to avoid receiving - * unnecessary broadcasts. The boolean {@link #USB_CONNECTED} extra indicates whether - * USB is connected or disconnected. - * The extras bundle will also contain name/value pairs with the name of the function - * and a value of either {@link #USB_FUNCTION_ENABLED} or {@link #USB_FUNCTION_DISABLED}. + * This is a sticky broadcast for clients that includes USB connected/disconnected state, + * the USB configuration that is currently set and a bundle containing name/value pairs + * with the names of the functions and a value of either {@link #USB_FUNCTION_ENABLED} + * or {@link #USB_FUNCTION_DISABLED}. * Possible USB function names include {@link #USB_FUNCTION_MASS_STORAGE}, * {@link #USB_FUNCTION_ADB}, {@link #USB_FUNCTION_RNDIS} and {@link #USB_FUNCTION_MTP}. */ @@ -66,38 +46,44 @@ public class UsbManager { public static final String USB_CONNECTED = "connected"; /** + * Integer extra containing currently set USB configuration. + * Used in extras for the {@link #ACTION_USB_STATE} broadcast. + */ + public static final String USB_CONFIGURATION = "configuration"; + + /** * Name of the USB mass storage USB function. - * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast + * Used in extras for the {@link #ACTION_USB_STATE} broadcast */ public static final String USB_FUNCTION_MASS_STORAGE = "mass_storage"; /** * Name of the adb USB function. - * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast + * Used in extras for the {@link #ACTION_USB_STATE} broadcast */ public static final String USB_FUNCTION_ADB = "adb"; /** * Name of the RNDIS ethernet USB function. - * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast + * Used in extras for the {@link #ACTION_USB_STATE} broadcast */ public static final String USB_FUNCTION_RNDIS = "rndis"; /** * Name of the MTP USB function. - * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast + * Used in extras for the {@link #ACTION_USB_STATE} broadcast */ public static final String USB_FUNCTION_MTP = "mtp"; /** * Value indicating that a USB function is enabled. - * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast + * Used in extras for the {@link #ACTION_USB_STATE} broadcast */ public static final String USB_FUNCTION_ENABLED = "enabled"; /** * Value indicating that a USB function is disabled. - * Used in extras for the {@link #ACTION_USB_CONNECTED} broadcast + * Used in extras for the {@link #ACTION_USB_STATE} broadcast */ public static final String USB_FUNCTION_DISABLED = "disabled"; |