Merge "Make sure mCurrentUsbFunctionsRequested flag be updated currectly"

This commit is contained in:
Treehugger Robot
2019-01-15 03:01:06 +00:00
committed by Gerrit Code Review

View File

@@ -1760,8 +1760,8 @@ public class UsbDeviceManager implements ActivityManagerInternal.ScreenObserver
mGadgetProxy.linkToDeath(new UsbGadgetDeathRecipient(),
USB_GADGET_HAL_DEATH_COOKIE);
mCurrentFunctions = UsbManager.FUNCTION_NONE;
mGadgetProxy.getCurrentUsbFunctions(new UsbGadgetCallback());
mCurrentUsbFunctionsRequested = true;
mGadgetProxy.getCurrentUsbFunctions(new UsbGadgetCallback());
}
String state = FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim();
updateState(state);