summaryrefslogtreecommitdiff
path: root/tests/UsbTests
diff options
context:
space:
mode:
authorAndrew Chant <achant@google.com>2018-03-02 13:18:18 -0800
committerAndrew Chant <achant@google.com>2018-03-26 20:55:28 +0000
commit0491f5aa0f3cc6b46bdf433bc900433b965943e2 (patch)
tree1b9cfc681da9925fbeb04c83a44d64d522bb1056 /tests/UsbTests
parentd52c532df7c7c481bf6e482c37f4e0ee02618fce (diff)
UsbDescriptorParser: always parse in constructor
UsbDescriptorParser::parseDescriptors always returned true. Remove the return value, and remove the one constructor that doesn't parse descriptors so the device is always in a parsed state. Bug: 74119682 Test: Built Change-Id: I2dd8d439405867d78102a9591dd1db36fe3959dc
Diffstat (limited to 'tests/UsbTests')
-rw-r--r--tests/UsbTests/src/com/android/server/usb/UsbDescriptorParserTests.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/UsbTests/src/com/android/server/usb/UsbDescriptorParserTests.java b/tests/UsbTests/src/com/android/server/usb/UsbDescriptorParserTests.java
index f32395226f4a..4b64083c2367 100644
--- a/tests/UsbTests/src/com/android/server/usb/UsbDescriptorParserTests.java
+++ b/tests/UsbTests/src/com/android/server/usb/UsbDescriptorParserTests.java
@@ -61,10 +61,7 @@ public class UsbDescriptorParserTests {
}
// Testing same codepath as UsbHostManager.java:usbDeviceAdded
- UsbDescriptorParser parser = new UsbDescriptorParser("test-usb-addr");
- if (!parser.parseDescriptors(descriptors)) {
- fail("failed to parse descriptors.");
- }
+ UsbDescriptorParser parser = new UsbDescriptorParser("test-usb-addr", descriptors);
return parser;
}