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

Commit 1d2eec44 authored by Yuyang Huang's avatar Yuyang Huang Committed by Gerrit Code Review
Browse files

Merge "update HeadsetNativeInterface's getByteAddress to match A2dpNativeInterface's" into main

parents 81c99b36 1c9e54b5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ public class HeadsetNativeInterface {
    }

    private byte[] getByteAddress(BluetoothDevice device) {
        if (device == null) {
            // Set bt_stack's active device to default if java layer set active device to null
            return Utils.getBytesFromAddress("00:00:00:00:00:00");
        }
        return mAdapterService.getByteIdentityAddress(device);
    }

@@ -491,10 +495,6 @@ public class HeadsetNativeInterface {
     */
    @VisibleForTesting
    public boolean setActiveDevice(BluetoothDevice device) {
        // Set bt_stack's active device to default if java layer set active device to null
        if (device == null) {
            return setActiveDeviceNative(Utils.getBytesFromAddress("00:00:00:00:00:00"));
        }
        return setActiveDeviceNative(getByteAddress(device));
    }