OSDN Git Service

Reset functions to null when user changes.
authorJerry Zhang <zhangjerry@google.com>
Wed, 23 Aug 2017 00:37:09 +0000 (17:37 -0700)
committerJerry Zhang <zhangjerry@google.com>
Wed, 23 Aug 2017 18:10:44 +0000 (11:10 -0700)
commite537a8313987bd10208281c4fa5c6834b4fd1d15
treece90d5768625db645a01cbd873cda36d6d57b65c
parent07168bf44b97f3d9d6b80b615d983f0eba84254b
Reset functions to null when user changes.

When MTP or PTP is in the config and user changes,
it clears dataUnlocked but sets the functions to
mCurrentFunctions which will leave MTP or PTP in the
config. If dataUnlocked is false, we want to remove
MTP/PTP from the config when adb is enabled, and leave
them in otherwise. This is done automatically by
setting functions to null.

Bug: 64822515
Test: Change users while adb  / mtp connected.
Change-Id: I82561f82e06f247c967438a473b08b5098d39ccb
services/usb/java/com/android/server/usb/UsbDeviceManager.java