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

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

Merge changes I693c7170,I811b0127 am: 4861d7bc am: 85f5cc34

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1976786

Change-Id: Ida61fe23faa38759111f7b11de67cd83b5cd0351
parents b2f5005f 85f5cc34
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -1114,11 +1114,21 @@ class AdapterProperties {
        writer.println("  " + "DiscoveryEndMs: " + mDiscoveryEndMs);

        writer.println("  " + "Bonded devices:");
        StringBuilder sb = new StringBuilder();
        for (BluetoothDevice device : mBondedDevices) {
            writer.println(
                    "    " + device.getAddress() + " [" + dumpDeviceType(device.getType()) + "] "
            String address = device.getAddress();
            String identityAddress = mService.getIdentityAddress(address);
            if (identityAddress.equals(address)) {
                writer.println("    " + address
                            + " [" + dumpDeviceType(device.getType()) + "] "
                            + Utils.getName(device));
            } else {
                sb.append("    " + address + " => " + identityAddress
                            + " [" + dumpDeviceType(device.getType()) + "] "
                            + Utils.getName(device) + "\n");
            }
        }
        writer.println(sb.toString());
    }

    private String dumpDeviceType(int deviceType) {
+4 −0
Original line number Diff line number Diff line
@@ -663,6 +663,9 @@ final class RemoteDevices {
                            }
                            break;
                        case AbstractionLayer.BT_PROPERTY_TYPE_OF_DEVICE:
                            if (device.isConsolidated()) {
                                return;
                            }
                            // The device type from hal layer, defined in bluetooth.h,
                            // matches the type defined in BluetoothDevice.java
                            device.mDeviceType = Utils.byteArrayToInt(val);
@@ -737,6 +740,7 @@ final class RemoteDevices {

        DeviceProperties deviceProperties = getDeviceProperties(device);
        deviceProperties.mIsConsolidated = true;
        deviceProperties.mDeviceType = BluetoothDevice.DEVICE_TYPE_DUAL;
        deviceProperties.mIdentityAddress = Utils.getAddressStringFromByte(secondaryAddress);
        mDualDevicesMap.put(deviceProperties.getIdentityAddress(), Utils.getAddressStringFromByte(mainAddress));
    }
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ const Uuid UUID_LE_AUDIO = Uuid::FromString("184E");
const Uuid UUID_LE_MIDI = Uuid::FromString("03B80E5A-EDE8-4B33-A751-6CE34EC4C700");
/* FIXME: Not known yet, using a placeholder instead. */
const Uuid UUID_HAS = Uuid::FromString("EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE");
const bool enable_address_consolidate = false;  // TODO remove
const bool enable_address_consolidate = true;  // TODO remove

#define COD_MASK 0x07FF