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:
Sharvil Nanavati
2014-04-08 14:51:15 -07:00
committed by Matthew Xie
parent 23fccdd0b5
commit 3e8eb40950

View File

@@ -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());
}
}