Settings: Extend the data role swap timeout value

Switching USB data role from device to host, it takes more than 3s in some devices, so 3s timeout is not enough.

Extend 3s timeout to 4s to be compatible with some devices with slow swap.

Bug: 209541948

Change-Id: I172498d66c5b12166162f2c55d94f0d441c7459c
diff --git a/src/com/android/settings/connecteddevice/usb/UsbBackend.java b/src/com/android/settings/connecteddevice/usb/UsbBackend.java
index 244818f..7f3a598 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbBackend.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbBackend.java
@@ -41,7 +41,10 @@
  */
 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;