MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / makeDeviceId

Method makeDeviceId

android/src/UsbSerialHelper.java:86–98  ·  view source on GitHub ↗
(UsbDevice device,
                                     boolean withSerialNumber)

Source from the content-addressed store, hash-verified

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) {

Callers 1

makePortIdMethod · 0.95

Calls 1

getSerialNumberMethod · 0.95

Tested by

no test coverage detected