Only send usb disconnect intents after boot. am: c1bc0a844d
am: dc9c094deb
am: 9877c70d9d
Change-Id: I515745dd4f30a979fffcb6c9eea8a38e1bef11ca
This commit is contained in:
@ -740,11 +740,12 @@ public class UsbDeviceManager {
|
|||||||
if (UsbManager.containsFunction(mCurrentFunctions,
|
if (UsbManager.containsFunction(mCurrentFunctions,
|
||||||
UsbManager.USB_FUNCTION_ACCESSORY)) {
|
UsbManager.USB_FUNCTION_ACCESSORY)) {
|
||||||
updateCurrentAccessory();
|
updateCurrentAccessory();
|
||||||
} else if (!mConnected) {
|
|
||||||
// restore defaults when USB is disconnected
|
|
||||||
setEnabledFunctions(null, false, false);
|
|
||||||
}
|
}
|
||||||
if (mBootCompleted) {
|
if (mBootCompleted) {
|
||||||
|
if (!mConnected) {
|
||||||
|
// restore defaults when USB is disconnected
|
||||||
|
setEnabledFunctions(null, false, false);
|
||||||
|
}
|
||||||
updateUsbStateBroadcastIfNeeded(false);
|
updateUsbStateBroadcastIfNeeded(false);
|
||||||
updateUsbFunctions();
|
updateUsbFunctions();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user