aboutsummaryrefslogtreecommitdiff
path: root/car-usb-handler/src
AgeCommit message (Collapse)Author
2017-04-03Support handling USB devices without serials.Kevin Crossan
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
2016-11-29Implement AOAP USB handler with simplified probing.Kevin Crossan
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