Merge "Broadcast only if boot complete" into oc-dr1-dev

This commit is contained in:
Jerry Zhang
2017-07-06 16:52:04 +00:00
committed by Android (Google) Code Review

View File

@@ -693,8 +693,9 @@ public class UsbDeviceManager {
// Set the new USB configuration.
setUsbConfig(oemFunctions);
if (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
|| UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP)) {
if (mBootCompleted
&& (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
|| UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP))) {
// Start up dependent services.
updateUsbStateBroadcastIfNeeded(true);
}