Only send usb disconnect intents after boot. am: c1bc0a844d

am: dc9c094deb

Change-Id: Icfadbbe67ef80977500916bcb84f0c7989941b7c
This commit is contained in:
Jerry Zhang
2017-01-31 00:58:14 +00:00
committed by android-build-merger

View File

@@ -740,11 +740,12 @@ public class UsbDeviceManager {
if (UsbManager.containsFunction(mCurrentFunctions,
UsbManager.USB_FUNCTION_ACCESSORY)) {
updateCurrentAccessory();
} else if (!mConnected) {
// restore defaults when USB is disconnected
setEnabledFunctions(null, false, false);
}
if (mBootCompleted) {
if (!mConnected) {
// restore defaults when USB is disconnected
setEnabledFunctions(null, false, false);
}
updateUsbStateBroadcastIfNeeded(false);
updateUsbFunctions();
}