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

Commit ab34ebc6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "BT MAINLINE ParcelFileDescriptor to dup method" am: 555c9561

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895130

Change-Id: Id5aa16675c15f3dd7ab4cb86790eaacec3bed9db
parents f37692dd 555c9561
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@ package android.bluetooth;


import android.annotation.RequiresNoPermission;
import android.annotation.RequiresNoPermission;
import android.annotation.RequiresPermission;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.bluetooth.annotations.RequiresBluetoothConnectPermission;
import android.bluetooth.annotations.RequiresBluetoothConnectPermission;
import android.compat.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.net.LocalSocket;
import android.net.LocalSocket;
@@ -266,7 +265,7 @@ public final class BluetoothSocket implements Closeable {
            throw new IOException("bt socket acept failed");
            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.mSocket = LocalSocket.createConnectedLocalSocket(fds[0]);
        as.mSocketIS = as.mSocket.getInputStream();
        as.mSocketIS = as.mSocket.getInputStream();
        as.mSocketOS = as.mSocket.getOutputStream();
        as.mSocketOS = as.mSocket.getOutputStream();