USB accessories are peripherals that connect to android devices as a USB host.
When connected, the accessory will first identify itself to the android device
by sending manufacturer, product, accessory type and version strings
to the device, and then request the device to enter USB accessory mode.
The device will then enable the USB accessory kernel driver and disable
all other USB functionality except possibly adb
(adb can be used while the android device is connected to the PC
and the PC is running software that emulates a USB accessory)
The class android.hardware.UsbAccessory is used to describe the
currently attached USB accessory.
UsbAccessory contains the manufacturer, product, accessory type
and version strings to identify the accessory.
The accessory can be opened as a ParcelFileDescriptor, which can be used
to communicate with the accessory over two bulk endpoints.
The Intents UsbManager.USB_ACCESSORY_ATTACHED and
UsbManager.USB_ACCESSORY_DETACHED are broadcast when accessories are
connected and disconnected to the device. The USB_ACCESSORY_ATTACHED
contains a UsbAccessory object for the attached accessory as an extra.
The Intent also contains string extras for the manufacturer, product,
accessory type and version strings to allow filtering on these strings.
Change-Id: Ie77cbf51814a4aa44a6b1e62673bfe4c6aa81755
Signed-off-by: Mike Lockwood <lockwood@android.com>
This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.
The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.
Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
This is to fix cases where the content width is keep changing due to
animation, such as 2011 google io site.
issue: 3451476
Change-Id: I8b1ba27a34e37a18116131ecc60391975ef75788
- remove unused local variables
- add char constants
- some variables renaming to be more understandable
Change-Id: Id54dd671b1449cca6463bf77160dc72c8bf0c805
Bug: 3225887
Bug: 3453253 (possibly)
Since some apps call setIconifiedByDefault(false) at the initialization step,
it isn't a good idea to open/close the keyboard during this call. Apps
can call setIconified(false) instead to invoke the keyboard.
Change-Id: I9d5d08b74055a3e99053d647df0cd4c7953bae80
Clean up handling of a few conditions in MenuPopupHelper that the
monkeys manage to trigger around the use of ViewTreeObserver. (bug
3443819, bug 3312949)
Fix a bug where a stale handler message could cause a ListPopupWindow
to reopen itself after being dismissed. (bug 3453607)
Change-Id: I488014767ccee785500862a2572beb35901d173b
increase the size of the SensorEvent pool from 1 to num_sensors*2.
and make the pool global instead of having an instance per SensorEventListener.
Change-Id: I1bcc53a9b07cd1f96fac6fe6e3b9da074e3cb1fd
Bug 3261766
If defined, the drawable is used instead of directly drawing a 1 pixel
line. This makes the cursor more fancy and more visible.
The drawable is currently clipped by the TextView's limits, which is
currently visible on the left when the cursor is at the first position.
To solve this issue properly, we would need to propagate a do-not-clip
up in the hierarchy.
Change-Id: I99f6001048eed14104994acf6bab942dda8eb38e