OSDN Git Service

Add setScreenUnlockedFunctions method to UsbManager
authorJerry Zhang <zhangjerry@google.com>
Fri, 1 Dec 2017 03:10:55 +0000 (19:10 -0800)
committerJerry Zhang <zhangjerry@google.com>
Tue, 9 Jan 2018 23:36:35 +0000 (15:36 -0800)
commit30b9adfad1c5055044f0b585782b10f764e0ddf9
tree2501d4b4057bb311aede24739f1f5fdf95107cfa
parent03033385afd531807c5f96a577f76f12a9a08431
Add setScreenUnlockedFunctions method to UsbManager

The screen unlocked functions save effort on setting
the usb config during each connection. These
functions persist between connections and between
boots. When the screen is unlocked and these
functions are set, the current functions will
be automatically set to the screen unlocked functions.

Also added svc command for this so it can be
used and tested while the UI is worked on.

Bug: 62876645
Test: svc usb setScreenUnlockedFunctions mtp
Test: Test functions with locking, unlocking, and
disconnecting, with no lockscreen, swipe, and pattern

Change-Id: Ia05e095917166d25398c4d310b02971e3a1bb12a
cmds/svc/src/com/android/commands/svc/UsbCommand.java
core/java/android/hardware/usb/IUsbManager.aidl
core/java/android/hardware/usb/UsbManager.java
services/usb/java/com/android/server/usb/UsbDeviceManager.java
services/usb/java/com/android/server/usb/UsbService.java