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

Commit d2ca3293 authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by Android (Google) Code Review
Browse files

Merge "Restart USB stack only if data is unlocked"

parents 289747ce dabd6b8f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -753,7 +753,7 @@ public class UsbDeviceManager {
                                        UsbManager.USB_FUNCTION_MTP)
                                || UsbManager.containsFunction(mCurrentFunctions,
                                        UsbManager.USB_FUNCTION_PTP);
                        if (active && mCurrentUser != UserHandle.USER_NULL) {
                        if (mUsbDataUnlocked && active && mCurrentUser != UserHandle.USER_NULL) {
                            Slog.v(TAG, "Current user switched to " + mCurrentUser
                                    + "; resetting USB host stack for MTP or PTP");
                            setEnabledFunctions(mCurrentFunctions, true);