Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b3a52fb authored by Sharvil Nanavati's avatar Sharvil Nanavati Committed by Matthew Xie
Browse files

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
parent 0c0d0736
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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());
        }
    }