Merge "Introduce debounce to filter rapidly toggling type-c ports"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9fd6645637
@@ -470,7 +470,10 @@ public class UsbDeviceManager {
|
||||
args.argi2 = sourcePower ? 1 :0;
|
||||
args.argi3 = sinkPower ? 1 :0;
|
||||
|
||||
obtainMessage(MSG_UPDATE_HOST_STATE, args).sendToTarget();
|
||||
removeMessages(MSG_UPDATE_HOST_STATE);
|
||||
Message msg = obtainMessage(MSG_UPDATE_HOST_STATE, args);
|
||||
// debounce rapid transitions of connect/disconnect on type-c ports
|
||||
sendMessageDelayed(msg, UPDATE_DELAY);
|
||||
}
|
||||
|
||||
private boolean waitForState(String state) {
|
||||
|
||||
Reference in New Issue
Block a user