cdc driver: swallow exception for now.

pull/36/head
mike wakerly 2012-06-29 01:58:11 -07:00
rodzic b4b6d147ea
commit f2ff56ba51
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -106,7 +106,11 @@ public class CdcAcmSerialDriver implements UsbSerialDriver {
timeoutMillis);
if (transferred < 0) {
throw new IOException("Timeout reading timeoutMillis=" + timeoutMillis);
// This sucks: we get -1 on timeout, not 0 as preferred.
// We *should* use UsbRequest, except it has a bug/api oversight
// where there is no way to determine the number of bytes read
// in response :\ -- http://b.android.com/28023
return 0;
}
System.arraycopy(mReadBuffer, 0, dest, 0, transferred);
return transferred;