Searched refs:usbDevice (Results 1 – 6 of 6) sorted by relevance
43 protected UsbDevice usbDevice = null; field in BaseUsbConnection58 protected abstract boolean isCompatibleUsbDevice(UsbDevice usbDevice); in isCompatibleUsbDevice() argument108 UsbDevice usbDevice = findUsbDevice(); in connect() local109 connect(usbDevice); in connect()112 public void connect(UsbDevice usbDevice) { in connect() argument113 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 …]
72 protected boolean isCompatibleUsbDevice(UsbDevice usbDevice) { in isCompatibleUsbDevice() argument75 return ((usbDevice.getProductId() != HALFKAY_PID) && in isCompatibleUsbDevice()76 (usbDevice.getVendorId() == TEENSY_VID)); in isCompatibleUsbDevice()98 UsbInterface iface = usbDevice.getInterface(ifIdx); in onConnect()
113 final UsbDevice usbDevice; in onResume() local117 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()
127 public void connect(UsbDevice usbDevice) { in connect() argument133 usbConnection.connect(usbDevice); in connect()
126 public void addOrUpdateUsbDevice(UsbDevice usbDevice, boolean hasPermission) { in addOrUpdateUsbDevice() argument127 Preconditions.checkNotNull(usbDevice); in addOrUpdateUsbDevice()128 Preconditions.checkNotNull(usbDevice.getDeviceName()); in addOrUpdateUsbDevice()129 usbDevices.put(usbDevice.getDeviceName(), usbDevice); in addOrUpdateUsbDevice() local131 grantPermission(usbDevice); in addOrUpdateUsbDevice()133 revokePermission(usbDevice, RuntimeEnvironment.application.getPackageName()); in addOrUpdateUsbDevice()138 public void removeUsbDevice(UsbDevice usbDevice) { in removeUsbDevice() argument139 Preconditions.checkNotNull(usbDevice); in removeUsbDevice()140 usbDevices.remove(usbDevice.getDeviceName()); in removeUsbDevice()141 revokePermission(usbDevice, RuntimeEnvironment.application.getPackageName()); in removeUsbDevice()
36 protected boolean isCompatibleUsbDevice(UsbDevice usbDevice) { in isCompatibleUsbDevice() argument37 return ((usbDevice.getProductId() == HALFKAY_PID) && in isCompatibleUsbDevice()38 (usbDevice.getVendorId() == HALFKAY_VID)); in isCompatibleUsbDevice()45 UsbInterface iface = usbDevice.getInterface(ifIdx); in onConnect()