History log of /packages/services/Car/car-usb-handler/src/android/car/usb/handler/UsbHostController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4f208d8be0fd9cbf1d9defb0587507f11a092b98 28-Mar-2017 Kevin Crossan <kcrossan@google.com> Support handling USB devices without serials.

If the serial number is null, then match based on the product ID and
vendor ID. The serial number is optional depending on the USB device
class.

Note: if the device supports AOAP, it is required to have a unique
serial number. This is because when a device is in AOAP mode it is
signaled by advertising a specific vendor and product ID; the
serial is the only data that can re-identify the USB device.

Test: manual - plugged in Lilliput touchscreen and verified logging
with no crash.
Test: manual - plugged in MD before new database schema and launched
projection. After updating code+schema, plugging in MD still launched
projection.
Test: manual - plugged in new MD and was able to start projection.
Change-Id: If2010feea075f88b2bb6f3cda7e9b2e1c5c4a15c
Fixes: 36599687
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/UsbHostController.java
d428549b58b2df5015bff81d79747265ee8be536 29-Nov-2016 Kevin Crossan <kcrossan@google.com> Implement AOAP USB handler with simplified probing.

The existing USB handler, part of the Kitchen Sink application,
was unreliable and hard to follow. This new handler simplifies
the code flow and only probes new USB devices by querying whether
they support AOAP by sending a USB control message. Further tests
(such as switching the device into AOAP) are not done by this app.

This new handler also attempts to handle any already connected AOAP
devices on system boot. This enables projection to start automatically
for compatible devices.

NOTE: because devices are not switched into AOAP mode during probing,
this means that IUsbAoapSupportCheckService.isDeviceSupported() is
now called with a UsbDevice that is _not_ in AOAP mode.

Fixes: 33185277
Test: Plugged the following MDs in and projection started:
N5, N5X, N6P, Pixel, Galaxy Note Edge, Moto X gen2, Xperia Z5, HTC M8
Test: Plugged in a phone before the system booted completely,
and projection started

Change-Id: Ice200f661bd85e6eebc97c95bcd23910d4dc25e6
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/UsbHostController.java