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/UsbDeviceSettings.java
|