OSDN Git Service

Refactored setCurrentFunction and setUsbDataUnlocked into single method.
authorJerry Zhang <zhangjerry@google.com>
Wed, 12 Oct 2016 22:49:32 +0000 (15:49 -0700)
committerJerry Zhang <zhangjerry@google.com>
Tue, 15 Nov 2016 23:29:45 +0000 (15:29 -0800)
commit935372bfd642f15afc6488f7df100f1bf76fc773
tree5eed96a0000b88890f77a730cecf031f8697099b
parentdfacad026dfc1582504969f8b268e7c3970c4496
Refactored setCurrentFunction and setUsbDataUnlocked into single method.

This gets rid of an extraneous configuration change when going from
adb to adb + file transfer as previously the config would have been
reset once for functions and once for data unlocked.

It also simplifies some of the code.

Test: manually changing usb configurations
Change-Id: Ica10a195338b2189db13113f44657393db110bee
(cherry picked from commit 7a396be6d5ba8914933a54b5bfac25e118db0e9f)
cmds/svc/src/com/android/commands/svc/UsbCommand.java
core/java/android/hardware/usb/IUsbManager.aidl
core/java/android/hardware/usb/UsbManager.java
services/core/java/com/android/server/connectivity/Tethering.java
services/usb/java/com/android/server/usb/UsbDeviceManager.java
services/usb/java/com/android/server/usb/UsbService.java