OSDN Git Service

DO NOT MERGE: UsbService: Make USB disconnect handling for accessory mode more robust
authorMike Lockwood <lockwood@android.com>
Tue, 29 Mar 2011 23:49:42 +0000 (16:49 -0700)
committerMike Lockwood <lockwood@android.com>
Wed, 30 Mar 2011 06:05:59 +0000 (23:05 -0700)
commit8f2e3862bc4629bf152810aa147089bd066ded83
treeae73ffb033b46b32981da8c834e5f5bdf69bf2c2
parent87805ca3a477e165891baa18efe5239a70d11bc9
DO NOT MERGE: UsbService: Make USB disconnect handling for accessory mode more robust

Handle the case where the kernel driver is in accessory mode but we failed
to initialize it at the framework level.  On disconnnect, check to see if the
accessory kernel driver is enabled rather than checking mCurrentAccessory.
That way we will restore the USB state in the kernel even if mCurrentAccessory
is null.

Change-Id: I2c4f6edb34aae2064f4b62ec0461d1fdd8770541
Signed-off-by: Mike Lockwood <lockwood@android.com>
services/java/com/android/server/usb/UsbService.java