1
0
mirror of https://github.com/mik3y/usb-serial-for-android synced 2025-06-10 09:26:23 +00:00

Fix open().

Issue #53.
This commit is contained in:
mike wakerly 2014-03-19 21:51:09 -07:00
parent a331afaa1a
commit 61714523fc

View File

@ -243,10 +243,11 @@ public class FtdiSerialDriver implements UsbSerialDriver {
if (mConnection != null) {
throw new IOException("Already open");
}
boolean opened = false;
try {
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");
} else {
throw new IOException("Error claiming interface " + i);