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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user