OSDN Git Service

Fixed handling of usb state during adb changes.
authorJerry Zhang <zhangjerry@google.com>
Thu, 13 Oct 2016 01:04:03 +0000 (18:04 -0700)
committerJerry Zhang <zhangjerry@google.com>
Thu, 12 Jan 2017 23:32:20 +0000 (15:32 -0800)
commit541295a9a53e38bde5fea4223ed2d63e3aacf93b
treee190c4efda4494ae948132e4e5a38f1d32083b04
parent1f2769189d81f75a5cbee7964ae0f04340baff61
Fixed handling of usb state during adb changes.

When changing state to adb from mtp (charging), we want to disable
the old mtp function. Similarly when change to away from adb to
charging, enable the mtp function.

Also the mtp function should never be persisted.

Bug: 31818377
Bug: 31814300
Test: Manually verify that the correct usb configuration is displayed.
Test: Manually verify that logcat is not kicked during boot.
Change-Id: Idcb7f53be39ea38712d5de45b323d8daeb552129
(cherry-picked from commit 58018d01a3c384b954275d15bee7f9c52a1c7c0a)
services/usb/java/com/android/server/usb/UsbDeviceManager.java