Merge "Settings: Extend the data role swap timeout value" am: bb994f627f am: df2a22f104

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1912875

Change-Id: I0d456509b02715b141a6110ef89a476995ce5d67
This commit is contained in:
Treehugger Robot
2021-12-15 07:23:26 +00:00
committed by Automerger Merge Worker

View File

@@ -41,7 +41,10 @@ import java.util.List;
*/
public class UsbBackend {
static final int PD_ROLE_SWAP_TIMEOUT_MS = 3000;
// extend this value from 3s to 4s because of switching data role
// in USB driver side takes about 3s in some devices, plus the usb
// port change event dispatching time, 3s is not enough.
static final int PD_ROLE_SWAP_TIMEOUT_MS = 4000;
static final int NONPD_ROLE_SWAP_TIMEOUT_MS = 15000;
private final boolean mFileTransferRestricted;