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

Commit 287578a6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reorder USB_STATE updates so config_changed is not replaced."

parents c8faece2 6f9dbb12
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -909,18 +909,20 @@ public class UsbDeviceManager {

                    updateUsbNotification(false);
                    updateAdbNotification(false);
                    if (mBootCompleted) {
                        Slog.i(TAG, "update state " + mConnected + " " + mConfigured);
                        updateUsbStateBroadcastIfNeeded(false);
                    }
                    if (UsbManager.containsFunction(mCurrentFunctions,
                            UsbManager.USB_FUNCTION_ACCESSORY)) {
                        updateCurrentAccessory();
                    }
                    if (mBootCompleted) {
                        Slog.i(TAG, "update state " + mConnected + " " + mConfigured);
                        if (!mConnected) {
                            // restore defaults when USB is disconnected
                            Slog.i(TAG, "Disconnect, setting usb functions to null");
                            setEnabledFunctions(null, false, false);
                        }
                        updateUsbStateBroadcastIfNeeded(false);
                        updateUsbFunctions();
                    } else {
                        mPendingBootBroadcast = true;