diff options
author | Mike Lockwood <lockwood@android.com> | 2011-03-01 08:04:54 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-03-01 08:07:20 -0800 |
commit | c4308f01c965571dc2354107c3574df113e397ee (patch) | |
tree | fa0c8c934147ab99f2ff6aec87edfb7266ba7890 /libs | |
parent | 43cdf9b4191e18b5a4d646d23b06438c0e10b8dd (diff) | |
download | frameworks_base-c4308f01c965571dc2354107c3574df113e397ee.zip frameworks_base-c4308f01c965571dc2354107c3574df113e397ee.tar.gz frameworks_base-c4308f01c965571dc2354107c3574df113e397ee.tar.bz2 |
Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/usb/src/com/google/android/usb/UsbAccessory.java | 2 | ||||
-rw-r--r-- | libs/usb/src/com/google/android/usb/UsbManager.java | 14 | ||||
-rw-r--r-- | libs/usb/tests/AccessoryChat/AndroidManifest.xml | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/libs/usb/src/com/google/android/usb/UsbAccessory.java b/libs/usb/src/com/google/android/usb/UsbAccessory.java index 91095f3..931f42e 100644 --- a/libs/usb/src/com/google/android/usb/UsbAccessory.java +++ b/libs/usb/src/com/google/android/usb/UsbAccessory.java @@ -26,7 +26,7 @@ public final class UsbAccessory { private final String mType; private final String mVersion; - /* package */ UsbAccessory(android.hardware.UsbAccessory accessory) { + /* package */ UsbAccessory(android.hardware.usb.UsbAccessory accessory) { mManufacturer = accessory.getManufacturer(); mModel = accessory.getModel(); mType = accessory.getType(); diff --git a/libs/usb/src/com/google/android/usb/UsbManager.java b/libs/usb/src/com/google/android/usb/UsbManager.java index 1b9bff9..d7afb95 100644 --- a/libs/usb/src/com/google/android/usb/UsbManager.java +++ b/libs/usb/src/com/google/android/usb/UsbManager.java @@ -19,7 +19,7 @@ package com.google.android.usb; import android.content.Context; import android.content.Intent; -import android.hardware.IUsbManager; +import android.hardware.usb.IUsbManager; import android.os.IBinder; import android.os.ParcelFileDescriptor; import android.os.RemoteException; @@ -43,7 +43,7 @@ public class UsbManager { * {@link com.google.android.usb.UsbAccessory} for the attached accessory. */ public static final String ACTION_USB_ACCESSORY_ATTACHED = - "android.hardware.action.USB_ACCESSORY_ATTACHED"; + "android.hardware.usb.action.USB_ACCESSORY_ATTACHED"; /** * Broadcast Action: A broadcast for USB accessory detached event. @@ -53,7 +53,7 @@ public class UsbManager { * {@link com.google.android.usb.UsbAccessory} for the attached accessory that was detached. */ public static final String ACTION_USB_ACCESSORY_DETACHED = - "android.hardware.action.USB_ACCESSORY_DETACHED"; + "android.hardware.usb.action.USB_ACCESSORY_DETACHED"; private final IUsbManager mService; @@ -79,8 +79,8 @@ public class UsbManager { * @return UsbAccessory for the broadcast. */ public static UsbAccessory getAccessory(Intent intent) { - android.hardware.UsbAccessory accessory = - intent.getParcelableExtra(android.hardware.UsbManager.EXTRA_ACCESSORY); + android.hardware.usb.UsbAccessory accessory = + intent.getParcelableExtra(android.hardware.usb.UsbManager.EXTRA_ACCESSORY); if (accessory == null) { return null; } else { @@ -96,7 +96,7 @@ public class UsbManager { */ public UsbAccessory[] getAccessoryList() { try { - android.hardware.UsbAccessory accessory = mService.getCurrentAccessory(); + android.hardware.usb.UsbAccessory accessory = mService.getCurrentAccessory(); if (accessory == null) { return null; } else { @@ -116,7 +116,7 @@ public class UsbManager { */ public ParcelFileDescriptor openAccessory(UsbAccessory accessory) { try { - return mService.openAccessory(new android.hardware.UsbAccessory( + return mService.openAccessory(new android.hardware.usb.UsbAccessory( accessory.getManufacturer(),accessory.getModel(), accessory.getType(), accessory.getVersion())); } catch (RemoteException e) { diff --git a/libs/usb/tests/AccessoryChat/AndroidManifest.xml b/libs/usb/tests/AccessoryChat/AndroidManifest.xml index b63999c..5922421 100644 --- a/libs/usb/tests/AccessoryChat/AndroidManifest.xml +++ b/libs/usb/tests/AccessoryChat/AndroidManifest.xml @@ -12,10 +12,10 @@ </intent-filter> <intent-filter> - <action android:name="android.hardware.action.USB_ACCESSORY_ATTACHED" /> + <action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" /> </intent-filter> - <meta-data android:name="android.hardware.action.USB_ACCESSORY_ATTACHED" + <meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" android:resource="@xml/accessory_filter" /> </activity> </application> |