Make sure BluetoothSocket#connect throws on error.
It sometimes fails silently, resulting in callers using the socket even though it hasn't been initialized. http://b/13909270 Change-Id: Ied08982b51d44c3d2dec72785888ea6c6497a664
This commit is contained in:
committed by
Matthew Xie
parent
23fccdd0b5
commit
3e8eb40950
@@ -325,6 +325,7 @@ public final class BluetoothSocket implements Closeable {
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, Log.getStackTraceString(new Throwable()));
|
||||
throw new IOException("unable to send RPC: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user