(UsbDevice device,
boolean withSerialNumber)
| 84 | ); |
| 85 | |
| 86 | private static String makeDeviceId(UsbDevice device, |
| 87 | boolean withSerialNumber) { |
| 88 | String id = String.format("%04X:%04X", |
| 89 | device.getVendorId(), device.getProductId()); |
| 90 | |
| 91 | if (withSerialNumber) { |
| 92 | String serialNumber = getSerialNumber(device); |
| 93 | if (serialNumber != null) |
| 94 | id += "[" + serialNumber + "]"; |
| 95 | } |
| 96 | |
| 97 | return id; |
| 98 | } |
| 99 | |
| 100 | private static String makePortId(UsbDevice device, int iface, |
| 101 | boolean withSerialNumber) { |
no test coverage detected