summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwang.zhenyu <wang.zhenyu2@zte.com.cn>2015-07-04 17:00:16 +0800
committerTim Kilbourn <tkilbourn@google.com>2015-07-22 17:45:16 +0000
commited987a52a2aa028814ecc73dd6d60244ac1df7f5 (patch)
tree4abd411fac522b7c7d147c034712b089bcb2e722
parentb73946715cb9e3ca7a2702407e34f885e92a5d9a (diff)
downloadframeworks_base-ed987a52a2aa028814ecc73dd6d60244ac1df7f5.zip
frameworks_base-ed987a52a2aa028814ecc73dd6d60244ac1df7f5.tar.gz
frameworks_base-ed987a52a2aa028814ecc73dd6d60244ac1df7f5.tar.bz2
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. Bug: 22657587 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 6300a9a..965341e 100644
--- a/services/usb/java/com/android/server/usb/UsbHostManager.java
+++ b/services/usb/java/com/android/server/usb/UsbHostManager.java
@@ -231,6 +231,8 @@ public class UsbHostManager {
mNewConfigurations = null;
mNewInterfaces = null;
mNewEndpoints = null;
+ mNewConfiguration = null;
+ mNewInterface = null;
}
}