Searched refs:mUsb (Results 1 – 4 of 4) sorted by relevance
/platform_testing/libraries/aoa-helper/src/com/android/helper/aoa/ |
D | UsbDevice.java | 34 private final IUsbNative mUsb; field in UsbDevice 40 mUsb = helper.getUsb(); in UsbDevice() 43 mUsb.libusb_get_device_descriptor(devicePointer, mDescriptor); in UsbDevice() 47 mUsb.libusb_open(devicePointer, handle); in UsbDevice() 68 return mUsb.libusb_control_transfer( in controlTransfer() 86 return mUsb.libusb_reset_device(checkNotNull(mHandle)); in reset() 103 int length = mUsb.libusb_get_string_descriptor_ascii(mHandle, mDescriptor[16], data, 64); in getSerialNumber() 126 mUsb.libusb_close(mHandle); in close()
|
D | UsbHelper.java | 50 private final IUsbNative mUsb; field in UsbHelper 61 mUsb = usb; in UsbHelper() 64 checkResult(mUsb.libusb_init(context)); in UsbHelper() 70 return mUsb; in getUsb() 90 throw new UsbException(mUsb.libusb_strerror(value)); in checkResult() 196 mUsb.libusb_exit(mContext); in close() 209 this.count = checkResult(mUsb.libusb_get_device_list(checkNotNull(mContext), list)); in DeviceList() 222 mUsb.libusb_free_device_list(list, true); in close()
|
/platform_testing/libraries/aoa-helper/tests/src/com/android/helper/aoa/ |
D | UsbDeviceTest.java | 47 private IUsbNative mUsb; field in UsbDeviceTest 55 mUsb = mock(IUsbNative.class); in setUp() 56 mHelper = new UsbHelper(mUsb); in setUp() 58 when(mUsb.libusb_open(any(), any())) in setUp() 88 verify(mUsb).libusb_control_transfer(eq(mHandle), in testControlTransfer() 104 verify(mUsb).libusb_reset_device(eq(mHandle)); in testReset() 117 when(mUsb.libusb_control_transfer( in testIsAoaCompatible() 130 when(mUsb.libusb_control_transfer( in testIsAoaCompatible()
|
D | UsbHelperTest.java | 54 private IUsbNative mUsb; field in UsbHelperTest 62 mUsb = mock(IUsbNative.class); in setUp() 64 when(mUsb.libusb_init(any())) in setUp() 73 when(mUsb.libusb_get_device_list(any(), any())) in setUp() 89 mHelper = spy(new UsbHelper(mUsb)); in setUp() 97 verify(mUsb, times(1)).libusb_init(any()); in testContext() 101 verify(mUsb, times(1)).libusb_exit(any()); in testContext() 124 verify(mUsb, times(1)).libusb_free_device_list(any(), eq(true)); in testGetSerialNumbers() 145 verify(mUsb, times(1)).libusb_free_device_list(any(), eq(true)); in testGetDevice() 157 verify(mUsb, times(1)).libusb_free_device_list(any(), eq(true)); in testGetDevice_invalid()
|