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

Commit ed0cc812 authored by Jerry Zhang's avatar Jerry Zhang Committed by Android (Google) Code Review
Browse files

Merge "Broadcast only if boot complete"

parents 266bd0d6 dc0c14f1
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -683,8 +683,9 @@ public class UsbDeviceManager {
                // Set the new USB configuration.
                // Set the new USB configuration.
                setUsbConfig(oemFunctions);
                setUsbConfig(oemFunctions);


                if (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
                if (mBootCompleted
                        || UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP)) {
                        && (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
                        || UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP))) {
                    // Start up dependent services.
                    // Start up dependent services.
                    updateUsbStateBroadcastIfNeeded(true);
                    updateUsbStateBroadcastIfNeeded(true);
                }
                }