summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-10-29 12:45:23 -0700
committerThe Android Automerger <android-build@google.com>2015-10-29 19:24:58 -0700
commitc32aacb0b30440967a6262d5f4b2d704f9647dbd (patch)
treeb60125d74185d9e94b5ebfb6b069e79dd51f9005 /services
parent9abc2aa7ede96685c518a8389a876096bb4299dc (diff)
downloadframeworks_base-c32aacb0b30440967a6262d5f4b2d704f9647dbd.zip
frameworks_base-c32aacb0b30440967a6262d5f4b2d704f9647dbd.tar.gz
frameworks_base-c32aacb0b30440967a6262d5f4b2d704f9647dbd.tar.bz2
UsbDeviceManager: set mUsbDataUnlocked=false on user switch
Make sure access to MTP data is relocked when a user switch occurs. Bug: 25288494 Change-Id: I69dafc7f51b847f4dba1993a85fb1a51df1a5e37
Diffstat (limited to 'services')
-rw-r--r--services/usb/java/com/android/server/usb/UsbDeviceManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
index 769ee46..a4a4d84 100644
--- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -715,6 +715,8 @@ public class UsbDeviceManager {
if (active && mCurrentUser != UserHandle.USER_NULL) {
Slog.v(TAG, "Current user switched to " + mCurrentUser
+ "; resetting USB host stack for MTP or PTP");
+ // avoid leaking sensitive data from previous user
+ mUsbDataUnlocked = false;
setEnabledFunctions(mCurrentFunctions, true);
}
mCurrentUser = msg.arg1;