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

Commit 2712df72 authored by Rahul Arya's avatar Rahul Arya Committed by Gerrit Code Review
Browse files

Merge "Fix address consolidation when creating sockets"

parents 3538fd76 05138246
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.bluetooth.btservice;

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

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