diff options
author | Mike Lockwood <lockwood@android.com> | 2011-06-08 09:17:45 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-06-08 09:17:45 -0700 |
commit | 9eb014aeb0630dab9210f8eb8b6c2f4250d5990e (patch) | |
tree | e828d015bc0763e79cbecd0255866020494c1f01 /core | |
parent | 3932aa7ff887007f4ae1e28e47b6775c9ceca566 (diff) | |
download | frameworks_base-9eb014aeb0630dab9210f8eb8b6c2f4250d5990e.zip frameworks_base-9eb014aeb0630dab9210f8eb8b6c2f4250d5990e.tar.gz frameworks_base-9eb014aeb0630dab9210f8eb8b6c2f4250d5990e.tar.bz2 |
UsbManager: Clean up extras for ACTION_USB_STATE broadcast
Also added name for new PTP USB function
Change-Id: Ia2775ba2b23ef6a6108ca7e060239eb51c2eecc8
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/hardware/usb/UsbManager.java | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/core/java/android/hardware/usb/UsbManager.java b/core/java/android/hardware/usb/UsbManager.java index 60b37a1..5994c98 100644 --- a/core/java/android/hardware/usb/UsbManager.java +++ b/core/java/android/hardware/usb/UsbManager.java @@ -50,11 +50,20 @@ public class UsbManager { * This is a sticky broadcast for clients that includes USB connected/disconnected state, * <ul> * <li> {@link #USB_CONNECTED} boolean indicating whether USB is connected or disconnected. - * <li> {@link #USB_CONFIGURATION} a Bundle containing name/value pairs where the name - * is the name of a USB function and the value is either {@link #USB_FUNCTION_ENABLED} - * or {@link #USB_FUNCTION_DISABLED}. The possible function names include - * {@link #USB_FUNCTION_MASS_STORAGE}, {@link #USB_FUNCTION_ADB}, {@link #USB_FUNCTION_RNDIS}, - * {@link #USB_FUNCTION_MTP} and {@link #USB_FUNCTION_ACCESSORY}. + * <li> {@link #USB_CONFIGURATION} integer containing current USB configuration + * currently zero if not configured, one for configured. + * <li> {@link #USB_FUNCTION_MASS_STORAGE} boolean extra indicating whether the + * mass storage function is enabled + * <li> {@link #USB_FUNCTION_ADB} boolean extra indicating whether the + * adb function is enabled + * <li> {@link #USB_FUNCTION_RNDIS} boolean extra indicating whether the + * RNDIS ethernet function is enabled + * <li> {@link #USB_FUNCTION_MTP} boolean extra indicating whether the + * MTP function is enabled + * <li> {@link #USB_FUNCTION_PTP} boolean extra indicating whether the + * PTP function is enabled + * <li> {@link #USB_FUNCTION_PTP} boolean extra indicating whether the + * accessory function is enabled * </ul> * * {@hide} @@ -159,30 +168,20 @@ public class UsbManager { public static final String USB_FUNCTION_MTP = "mtp"; /** - * Name of the Accessory USB function. + * Name of the PTP USB function. * Used in extras for the {@link #ACTION_USB_STATE} broadcast * * {@hide} */ - public static final String USB_FUNCTION_ACCESSORY = "accessory"; - - /** - * Value indicating that a USB function is enabled. - * Used in {@link #USB_CONFIGURATION} extras bundle for the - * {@link #ACTION_USB_STATE} broadcast - * - * {@hide} - */ - public static final String USB_FUNCTION_ENABLED = "enabled"; + public static final String USB_FUNCTION_PTP = "ptp"; /** - * Value indicating that a USB function is disabled. - * Used in {@link #USB_CONFIGURATION} extras bundle for the - * {@link #ACTION_USB_STATE} broadcast + * Name of the Accessory USB function. + * Used in extras for the {@link #ACTION_USB_STATE} broadcast * * {@hide} */ - public static final String USB_FUNCTION_DISABLED = "disabled"; + public static final String USB_FUNCTION_ACCESSORY = "accessory"; /** * Name of extra for {@link #ACTION_USB_DEVICE_ATTACHED} and |