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

Method open

android/src/UsbSerialHelper.java:169–181  ·  view source on GitHub ↗
(int baud)

Source from the content-addressed store, hash-verified

167 }
168
169 public synchronized AndroidPort open(int baud) throws IOException {
170 if (port != null)
171 throw new IOException("Port already occupied");
172
173 port = new UsbSerialPort(this, baud);
174 if (usbmanager.hasPermission(device)) {
175 port.open(usbmanager, device, iface);
176 } else {
177 requestPermission(device);
178 }
179
180 return port;
181 }
182
183 public synchronized void permissionGranted() {
184 if (!port.isOpen())

Callers 2

connectMethod · 0.95
permissionGrantedMethod · 0.45

Calls 1

requestPermissionMethod · 0.80

Tested by

no test coverage detected