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

Commit aa62fcb0 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Fix advertise data size estimation" am: 5b2e9f40b4 am: 3e86c9d2

am: b20805d38c

Change-Id: I71ce3e69f8c8c88a4df075b2f7b8de90581c3de4
parents 75c75dc8 3e86c9d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ public final class BluetoothLeAdvertiser {
    // Flags field will be set by system.
    private static final int FLAGS_FIELD_BYTES = 3;
    private static final int MANUFACTURER_SPECIFIC_DATA_LENGTH = 2;
    private static final int SERVICE_DATA_UUID_LENGTH = 2;

    private final IBluetoothManager mBluetoothManager;
    private final Handler mHandler;
@@ -383,7 +382,8 @@ public final class BluetoothLeAdvertiser {
            }
        }
        for (ParcelUuid uuid : data.getServiceData().keySet()) {
            size += OVERHEAD_BYTES_PER_FIELD + SERVICE_DATA_UUID_LENGTH
            int uuidLen = BluetoothUuid.uuidToBytes(uuid).length;
            size += OVERHEAD_BYTES_PER_FIELD + uuidLen
                    + byteLength(data.getServiceData().get(uuid));
        }
        for (int i = 0; i < data.getManufacturerSpecificData().size(); ++i) {