我正在使用 android 4.2.2 即 API 17,但错误调用需要 API 级别 12(当前最小值为 8):android.hardware.usb.UsbManager#openDevice
public List<UsbSerialDriver> probe(final UsbManager manager, final UsbDevice usbDevice)
{
if (!testIfSupported(usbDevice, FtdiSerialDriver.getSupportedDevices()))
{
return Collections.emptyList();
}
final UsbDeviceConnection connection = ***manager.openDevice(usbDevice)***;
if (connection == null)
{
return Collections.emptyList();
}
final UsbSerialDriver driver = new FtdiSerialDriver(usbDevice, connection);
return Collections.singletonList(driver);
}