Skip to content
Snippets Groups Projects
Commit ea1d6614 authored by jiabin's avatar jiabin
Browse files

Remove extra `0x` in raw USB descriptor dump.

Bug: 315025063
Test: adb shell dumpsys usb dump-descriptors -dump-raw
Change-Id: I1d8d5a2c6aaaff3330c47c243147b1f4fde734e9
parent 0cd20302
No related branches found
No related tags found
No related merge requests found
......@@ -221,9 +221,7 @@ public class UsbHostManager {
for (int line = 0; line < length / kDumpBytesPerLine; line++) {
StringBuilder sb = new StringBuilder();
for (int offset = 0; offset < kDumpBytesPerLine; offset++) {
sb.append("0x")
.append(String.format("0x%02X", mDescriptors[dataOffset++]))
.append(" ");
sb.append(String.format("0x%02X", mDescriptors[dataOffset++])).append(" ");
}
pw.println(sb.toString());
}
......@@ -231,9 +229,7 @@ public class UsbHostManager {
// remainder
StringBuilder sb = new StringBuilder();
while (dataOffset < length) {
sb.append("0x")
.append(String.format("0x%02X", mDescriptors[dataOffset++]))
.append(" ");
sb.append(String.format("0x%02X", mDescriptors[dataOffset++])).append(" ");
}
pw.println(sb.toString());
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment