Skip to content

Commit 2bccc88

Browse files
committed
Fix missing deprecated onCharacteristicChanged override for Android 12 and below.
1 parent 427930a commit 2bccc88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

android/app/src/main/java/betaflight/configurator/protocols/bluetooth/BetaflightBluetoothPlugin.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,13 @@ public void onServicesDiscovered(BluetoothGatt gatt, int status) {
958958
notifyListeners("services", payload);
959959
}
960960

961+
@Deprecated
962+
@Override
963+
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
964+
byte[] value = characteristic != null ? characteristic.getValue() : null;
965+
onCharacteristicChanged(gatt, characteristic, value);
966+
}
967+
961968
@Override
962969
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, byte[] value) {
963970
JSObject payload = new JSObject();

0 commit comments

Comments
 (0)