[DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed am: 786e2694b1

am: 8fd324c33f

Change-Id: Idbe61150d738e5e41d5606fa6d89c0a5b604a86d
This commit is contained in:
Ajay Panicker
2016-09-21 21:55:46 +00:00
committed by android-build-merger

View File

@@ -196,6 +196,7 @@ public final class BluetoothSocket implements Closeable {
as.close(); as.close();
throw new IOException("bt socket acept failed"); throw new IOException("bt socket acept failed");
} }
as.mPfd = new ParcelFileDescriptor(fds[0]);
as.mSocket = new LocalSocket(fds[0]); as.mSocket = new LocalSocket(fds[0]);
as.mSocketIS = as.mSocket.getInputStream(); as.mSocketIS = as.mSocket.getInputStream();
as.mSocketOS = as.mSocket.getOutputStream(); as.mSocketOS = as.mSocket.getOutputStream();