summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/usb/java/com/android/server/usb/descriptors/UsbDescriptor.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/usb/java/com/android/server/usb/descriptors/UsbDescriptor.java b/services/usb/java/com/android/server/usb/descriptors/UsbDescriptor.java
index 3fc5fe320574..ff67667e848d 100644
--- a/services/usb/java/com/android/server/usb/descriptors/UsbDescriptor.java
+++ b/services/usb/java/com/android/server/usb/descriptors/UsbDescriptor.java
@@ -126,6 +126,9 @@ public abstract class UsbDescriptor implements Reporting {
public static final int REQUEST_GET_CONFIGURATION = 0x08;
public static final int REQUEST_SET_CONFIGURATION = 0x09;
+ // USB control transfer timeout
+ public static final int USB_CONTROL_TRANSFER_TIMEOUT_MS = 200;
+
/**
* @throws IllegalArgumentException
*/
@@ -224,7 +227,7 @@ public abstract class UsbDescriptor implements Reporting {
0,
sStringBuffer,
0xFF,
- 0);
+ USB_CONTROL_TRANSFER_TIMEOUT_MS);
if (rdo >= 0) {
usbStr = new String(sStringBuffer, 2, rdo - 2, "UTF-16LE");
} else {