diff options
author | Jerry Zhang <zhangjerry@google.com> | 2016-10-12 15:49:32 -0700 |
---|---|---|
committer | Jerry Zhang <zhangjerry@google.com> | 2016-11-15 15:29:45 -0800 |
commit | 935372bfd642f15afc6488f7df100f1bf76fc773 (patch) | |
tree | 5eed96a0000b88890f77a730cecf031f8697099b /cmds/svc | |
parent | dfacad026dfc1582504969f8b268e7c3970c4496 (diff) |
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)
Diffstat (limited to 'cmds/svc')
-rw-r--r-- | cmds/svc/src/com/android/commands/svc/UsbCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/svc/src/com/android/commands/svc/UsbCommand.java b/cmds/svc/src/com/android/commands/svc/UsbCommand.java index a6ef25fc4479..4dcb05e4f85d 100644 --- a/cmds/svc/src/com/android/commands/svc/UsbCommand.java +++ b/cmds/svc/src/com/android/commands/svc/UsbCommand.java @@ -50,7 +50,7 @@ public class UsbCommand extends Svc.Command { IUsbManager usbMgr = IUsbManager.Stub.asInterface(ServiceManager.getService( Context.USB_SERVICE)); try { - usbMgr.setCurrentFunction((args.length >=3 ? args[2] : null)); + usbMgr.setCurrentFunction((args.length >=3 ? args[2] : null), false); } catch (RemoteException e) { System.err.println("Error communicating with UsbManager: " + e); } |