mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-11 18:06:17 +00:00
parent
a331afaa1a
commit
61714523fc
@ -243,10 +243,11 @@ public class FtdiSerialDriver implements UsbSerialDriver {
|
|||||||
if (mConnection != null) {
|
if (mConnection != null) {
|
||||||
throw new IOException("Already open");
|
throw new IOException("Already open");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean opened = false;
|
boolean opened = false;
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||||
if (mConnection.claimInterface(mDevice.getInterface(i), true)) {
|
if (connection.claimInterface(mDevice.getInterface(i), true)) {
|
||||||
Log.d(TAG, "claimInterface " + i + " SUCCESS");
|
Log.d(TAG, "claimInterface " + i + " SUCCESS");
|
||||||
} else {
|
} else {
|
||||||
throw new IOException("Error claiming interface " + i);
|
throw new IOException("Error claiming interface " + i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user