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

Commit d33d66e2 authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

UsbDeviceManager: set mUsbDataUnlocked=false on user switch am: 57013217

am: aa330c0d

* commit 'aa330c0d':
  UsbDeviceManager: set mUsbDataUnlocked=false on user switch
parents 091b11d7 aa330c0d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -716,6 +716,8 @@ public class UsbDeviceManager {
                        if (active && mCurrentUser != UserHandle.USER_NULL) {
                        if (active && mCurrentUser != UserHandle.USER_NULL) {
                            Slog.v(TAG, "Current user switched to " + mCurrentUser
                            Slog.v(TAG, "Current user switched to " + mCurrentUser
                                    + "; resetting USB host stack for MTP or PTP");
                                    + "; resetting USB host stack for MTP or PTP");
                            // avoid leaking sensitive data from previous user
                            mUsbDataUnlocked = false;
                            setEnabledFunctions(mCurrentFunctions, true);
                            setEnabledFunctions(mCurrentFunctions, true);
                        }
                        }
                        mCurrentUser = msg.arg1;
                        mCurrentUser = msg.arg1;