Home
last modified time | relevance | path

Searched refs:usbDevice (Results 1 – 6 of 6) sorted by relevance

/external/walt/android/WALT/app/src/main/java/org/chromium/latency/walt/
DBaseUsbConnection.java43 protected UsbDevice usbDevice = null; field in BaseUsbConnection
58 protected abstract boolean isCompatibleUsbDevice(UsbDevice usbDevice); in isCompatibleUsbDevice() argument
108 UsbDevice usbDevice = findUsbDevice(); in connect() local
109 connect(usbDevice); in connect()
112 public void connect(UsbDevice usbDevice) { in connect() argument
113 if (usbDevice == null) { in connect()
118 if (!isCompatibleUsbDevice(usbDevice)) { in connect()
123 this.usbDevice = usbDevice; in connect()
135 usbManager.requestPermission(this.usbDevice, permissionIntent); in connect()
143 usbDevice = null; in disconnect()
[all …]
DWaltUsbConnection.java72 protected boolean isCompatibleUsbDevice(UsbDevice usbDevice) { in isCompatibleUsbDevice() argument
75 return ((usbDevice.getProductId() != HALFKAY_PID) && in isCompatibleUsbDevice()
76 (usbDevice.getVendorId() == TEENSY_VID)); in isCompatibleUsbDevice()
98 UsbInterface iface = usbDevice.getInterface(ifIdx); in onConnect()
DMainActivity.java113 final UsbDevice usbDevice; in onResume() local
117 usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onResume()
119 usbDevice = null; in onResume()
126 if (usbDevice == null) { in onResume()
129 waltDevice.connect(usbDevice); in onResume()
DWaltDevice.java127 public void connect(UsbDevice usbDevice) { in connect() argument
133 usbConnection.connect(usbDevice); in connect()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowUsbManager.java126 public void addOrUpdateUsbDevice(UsbDevice usbDevice, boolean hasPermission) { in addOrUpdateUsbDevice() argument
127 Preconditions.checkNotNull(usbDevice); in addOrUpdateUsbDevice()
128 Preconditions.checkNotNull(usbDevice.getDeviceName()); in addOrUpdateUsbDevice()
129 usbDevices.put(usbDevice.getDeviceName(), usbDevice); in addOrUpdateUsbDevice() local
131 grantPermission(usbDevice); in addOrUpdateUsbDevice()
133 revokePermission(usbDevice, RuntimeEnvironment.application.getPackageName()); in addOrUpdateUsbDevice()
138 public void removeUsbDevice(UsbDevice usbDevice) { in removeUsbDevice() argument
139 Preconditions.checkNotNull(usbDevice); in removeUsbDevice()
140 usbDevices.remove(usbDevice.getDeviceName()); in removeUsbDevice()
141 revokePermission(usbDevice, RuntimeEnvironment.application.getPackageName()); in removeUsbDevice()
/external/walt/android/WALT/app/src/main/java/org/chromium/latency/walt/programmer/
DBootloaderConnection.java36 protected boolean isCompatibleUsbDevice(UsbDevice usbDevice) { in isCompatibleUsbDevice() argument
37 return ((usbDevice.getProductId() == HALFKAY_PID) && in isCompatibleUsbDevice()
38 (usbDevice.getVendorId() == HALFKAY_VID)); in isCompatibleUsbDevice()
45 UsbInterface iface = usbDevice.getInterface(ifIdx); in onConnect()