Pebble 2 Duo: react to MTU changes though the official BLE way

This commit is contained in:
Andreas Shimokawa
2025-11-02 07:38:45 +01:00
parent 75035f26c3
commit ae0aa6df63
@@ -222,6 +222,14 @@ class PebbleGATTClient extends BluetoothGattCallback {
}
}
@Override
public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
if (status == BluetoothGatt.GATT_SUCCESS) {
LOG.info("MTU changed to {}", mtu);
mPebbleLESupport.setMTU(mtu);
}
}
private void connectToPebble(BluetoothDevice btDevice) {
if (removeBond) {
BondingUtil.Unpair(GBApplication.getContext(), btDevice.getAddress());