1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Huami 2021: Do not initialize device for chunked ack

Since we now handle chunked acks as of 74dac3f5c, these may happen
during device initialization. We must not use performInitialized, or
initializeDevice will be called twice, since the device will still not
be in INITIALIZING state.
This commit is contained in:
José Rebelo 2023-07-22 13:50:54 +01:00
parent f58c655449
commit 76576af324

View File

@ -2482,7 +2482,7 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
final byte count = huami2021ChunkedDecoder.getLastCount(); final byte count = huami2021ChunkedDecoder.getLastCount();
try { try {
final TransactionBuilder builder = performInitialized("send chunked ack"); final TransactionBuilder builder = createTransactionBuilder("send chunked ack");
builder.write(characteristicChunked2021Read, new byte[] {0x04, 0x00, handle, 0x01, count}); builder.write(characteristicChunked2021Read, new byte[] {0x04, 0x00, handle, 0x01, count});
builder.queue(getQueue()); builder.queue(getQueue());
} catch (final Exception e) { } catch (final Exception e) {