diff options
| author | 2021-11-29 17:21:33 +0000 | |
|---|---|---|
| committer | 2021-11-29 17:21:33 +0000 | |
| commit | 1e6ac5e1ff5ae3789ac888193b29d1769d403be0 (patch) | |
| tree | 61e29a92efc149cea3153cc339bbeac56f97dd70 | |
| parent | 6fc7c6257208db4554485e434839e82dedcff027 (diff) | |
| parent | d12faff084d5e863ea2e7e829e9f2688695029a5 (diff) | |
Merge "BT MAINLINE ParcelFileDescriptor to dup method"
| -rw-r--r-- | core/java/android/bluetooth/BluetoothSocket.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java index 1655b62bbfec..db5b75148e88 100644 --- a/core/java/android/bluetooth/BluetoothSocket.java +++ b/core/java/android/bluetooth/BluetoothSocket.java @@ -18,7 +18,6 @@ package android.bluetooth; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; -import android.annotation.SuppressLint; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; import android.compat.annotation.UnsupportedAppUsage; import android.net.LocalSocket; @@ -266,7 +265,7 @@ public final class BluetoothSocket implements Closeable { throw new IOException("bt socket acept failed"); } - as.mPfd = new ParcelFileDescriptor(fds[0]); + as.mPfd = ParcelFileDescriptor.dup(fds[0]); as.mSocket = LocalSocket.createConnectedLocalSocket(fds[0]); as.mSocketIS = as.mSocket.getInputStream(); as.mSocketOS = as.mSocket.getOutputStream(); |