From bc3d6bf593ed27592a939a58a056776b6a5407bb Mon Sep 17 00:00:00 2001 From: Robert Farnum Date: Tue, 6 Apr 2021 21:52:32 -0500 Subject: [PATCH] Android: use ENABLE_NOTIFICATION_VALUE instead of ENABLE_INDICATION_VALUE (#5784) * Fix Issue#5593 * Fix Issue#5593 * Merge with master * issue#5593 merge with master * issue#5593 do not reformat code * issue#5593 apply patch failure on second part * Restyled by whitespace Co-authored-by: Restyled.io --- .../java/src/chip/devicecontroller/AndroidChipStack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/java/src/chip/devicecontroller/AndroidChipStack.java b/src/controller/java/src/chip/devicecontroller/AndroidChipStack.java index fd2f0390b9801f..f751c9d2cb84ca 100644 --- a/src/controller/java/src/chip/devicecontroller/AndroidChipStack.java +++ b/src/controller/java/src/chip/devicecontroller/AndroidChipStack.java @@ -162,7 +162,7 @@ public void onDescriptorWrite( return; } - if (desc.getValue() == BluetoothGattDescriptor.ENABLE_INDICATION_VALUE) { + if (desc.getValue() == BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE) { handleSubscribeComplete( connId, svcIdBytes, charIdBytes, status == BluetoothGatt.GATT_SUCCESS); } else if (desc.getValue() == BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE) { @@ -302,7 +302,7 @@ public static boolean onSubscribeCharacteristic(int connId, byte[] svcId, byte[] BluetoothGattDescriptor descriptor = subscribeChar.getDescriptor(UUID.fromString(CLIENT_CHARACTERISTIC_CONFIG)); - descriptor.setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE); + descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE); if (!bluetoothGatt.writeDescriptor(descriptor)) { Log.e(TAG, "writeDescriptor failed"); return false;