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

Commit 403e2052 authored by Kihong Seong's avatar Kihong Seong
Browse files

Fix description of exception in writeCharacteristic

This changes the description when BluetoothGatt.writeCharacteristic is
done with value over max length.

Bug: 286892994
Test: atest CtsBluetoothTestCases
Change-Id: I5c0669630730e04088e8fb12ebbd6186be0eef23
parent e02e8cfe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1442,7 +1442,7 @@ public final class BluetoothGatt implements BluetoothProfile {
        }
        if (value.length > GATT_MAX_ATTR_LEN) {
            throw new IllegalArgumentException(
                    "notification should not be longer than max length of an attribute value");
                    "value should not be longer than max length of an attribute value");
        }
        if (VDBG) Log.d(TAG, "writeCharacteristic() - uuid: " + characteristic.getUuid());
        if ((characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_WRITE) == 0