1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-20 13:51:01 +02:00

Huami: Prevent activity data fetch if there is no data to fetch

More information in #3201

Fixes #3196
This commit is contained in:
José Rebelo 2023-07-12 23:21:56 +01:00
parent ccfc112e2b
commit 525f1567c1

View File

@ -197,7 +197,7 @@ public abstract class AbstractFetchOperation extends AbstractHuamiOperation {
if (expectedDataLength == 0 && isHuami2021) {
// Nothing to receive, if we try to fetch data it will fail
sendAck2021(true);
} else {
} else if (expectedDataLength != 0) {
TransactionBuilder newBuilder = createTransactionBuilder(taskName + " Step 2");
newBuilder.notify(characteristicActivityData, true);
newBuilder.write(characteristicFetch, new byte[]{HuamiService.COMMAND_FETCH_DATA});