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

Commit f7974f3c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix address consolidation when creating sockets" into tm-qpr-dev

parents 2ca1fc3e e13930c2
Loading
Loading
Loading
Loading
+12 −7
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.bluetooth.btservice;
package com.android.bluetooth.btservice;


import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.bluetooth.IBluetoothSocketManager;
import android.bluetooth.IBluetoothSocketManager;
import android.os.Binder;
import android.os.Binder;
import android.os.ParcelFileDescriptor;
import android.os.ParcelFileDescriptor;
@@ -49,8 +50,12 @@ class BluetoothSocketManagerBinder extends IBluetoothSocketManager.Stub {
            return null;
            return null;
        }
        }


        return marshalFd(mService.connectSocketNative(
        return marshalFd(
            Utils.getBytesFromAddress(device.getAddress()),
                mService.connectSocketNative(
                        Utils.getBytesFromAddress(
                                type == BluetoothSocket.TYPE_L2CAP_LE
                                        ? device.getAddress()
                                        : mService.getIdentityAddress(device.getAddress())),
                        type,
                        type,
                        Utils.uuidToByteArray(uuid),
                        Utils.uuidToByteArray(uuid),
                        port,
                        port,