From fcf10f7c12cb3107bdfedce6f76a8c866d154f3c Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Wed, 13 May 2015 11:54:03 -0700 Subject: Modify how USB connections are handled. * Introduce a new "charger only" mode. In this mode, MTP is disabled, and no file transfers can occur. * Make charger only mode the default. * Modify "persist.sys.usb.config" so it now only holds the adb status. * Make the USB settings non-persistent. Unplugging the USB connection will reset the device back to "charger only" mode. * Fixup wording per UI guidelines. TODO: Re-implement MDM restrictions for USB / MTP access controls. Bug: 18905620 Change-Id: I99a50d9132a81e98187f431166fd9fef4d437e4f --- cmds/svc/src/com/android/commands/svc/UsbCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/svc') diff --git a/cmds/svc/src/com/android/commands/svc/UsbCommand.java b/cmds/svc/src/com/android/commands/svc/UsbCommand.java index 4dcb05e..a6ef25f 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), false); + usbMgr.setCurrentFunction((args.length >=3 ? args[2] : null)); } catch (RemoteException e) { System.err.println("Error communicating with UsbManager: " + e); } -- cgit v1.1