Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57013217 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

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
parent c3cd7b15
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;