summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/usb
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2012-04-24 10:45:18 -0700
committerMike Lockwood <lockwood@google.com>2012-04-26 15:09:35 -0700
commit166b05e0ce913711d27ce1a116b3f1fd906822e4 (patch)
tree51ac35f95905a28b7e15512ae8d9160723e45464 /core/java/android/hardware/usb
parent8f014059d3084fcce9e82b4b1f8b8323744ac52d (diff)
downloadframeworks_base-166b05e0ce913711d27ce1a116b3f1fd906822e4.zip
frameworks_base-166b05e0ce913711d27ce1a116b3f1fd906822e4.tar.gz
frameworks_base-166b05e0ce913711d27ce1a116b3f1fd906822e4.tar.bz2
UsbService: Add support for accessory initiating USB audio support
Change-Id: I0e468f4b841de9e1ca7b75a05fc58299dbc78222 Signed-off-by: Mike Lockwood <lockwood@google.com>
Diffstat (limited to 'core/java/android/hardware/usb')
-rw-r--r--core/java/android/hardware/usb/UsbAccessory.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/core/java/android/hardware/usb/UsbAccessory.java b/core/java/android/hardware/usb/UsbAccessory.java
index 7702044..5719452 100644
--- a/core/java/android/hardware/usb/UsbAccessory.java
+++ b/core/java/android/hardware/usb/UsbAccessory.java
@@ -55,6 +55,19 @@ public class UsbAccessory implements Parcelable {
private final String mUri;
private final String mSerial;
+ /** @hide */
+ public static final int MANUFACTURER_STRING = 0;
+ /** @hide */
+ public static final int MODEL_STRING = 1;
+ /** @hide */
+ public static final int DESCRIPTION_STRING = 2;
+ /** @hide */
+ public static final int VERSION_STRING = 3;
+ /** @hide */
+ public static final int URI_STRING = 4;
+ /** @hide */
+ public static final int SERIAL_STRING = 5;
+
/**
* UsbAccessory should only be instantiated by UsbService implementation
* @hide
@@ -74,12 +87,12 @@ public class UsbAccessory implements Parcelable {
* @hide
*/
public UsbAccessory(String[] strings) {
- mManufacturer = strings[0];
- mModel = strings[1];
- mDescription = strings[2];
- mVersion = strings[3];
- mUri = strings[4];
- mSerial = strings[5];
+ mManufacturer = strings[MANUFACTURER_STRING];
+ mModel = strings[MODEL_STRING];
+ mDescription = strings[DESCRIPTION_STRING];
+ mVersion = strings[VERSION_STRING];
+ mUri = strings[URI_STRING];
+ mSerial = strings[SERIAL_STRING];
}
/**