summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wang.zhenyu <wang.zhenyu2@zte.com.cn> 2015-07-04 17:00:16 +0800
committer wang.zhenyu <wangzzzyyy@gmail.com> 2015-07-06 11:35:44 +0800
commit19b26f875416e412de7792f6829498a748cf9602 (patch)
tree364c761c37ec1dc795ddf6ae8f1d7485f770bd23
parent761e39e18990b657c488c78a6c048f625bd6b74a (diff)
Miss USB device Interface from UsbManager.getDeviceList().
In the scenario that you connect more than one device to android phone with an usb hub, when you attach the second device,mNewConfigurationis is still corresponded to the first device unless another mNewConfiguration is created by a new operation. However,before another mNewConfiguration is created,setInterfaces() in addUsbConfiguration() has already been executed. Problem is that mNewInterfaces has already been cleared when it finished endUsbDeviceAdded for the first device. As a result,the UsbInterface descriptor in the first device's Configuration descriptor is set to null. Change-Id: I0ba4f07c809d07ebebed633e43c3ee8e2e4c5060
-rw-r--r--services/usb/java/com/android/server/usb/UsbHostManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbHostManager.java b/services/usb/java/com/android/server/usb/UsbHostManager.java
index e769bda1eb6f..4451d7d84abd 100644
--- a/services/usb/java/com/android/server/usb/UsbHostManager.java
+++ b/services/usb/java/com/android/server/usb/UsbHostManager.java
@@ -230,6 +230,8 @@ public class UsbHostManager {
mNewConfigurations = null;
mNewInterfaces = null;
mNewEndpoints = null;
+ mNewConfiguration = null;
+ mNewInterface = null;
}
}