Xiaomi-protobuf: Do not signal new activity data if we were not fetching

Might fix #6338
This commit is contained in:
José Rebelo
2026-06-23 13:18:31 +01:00
parent 835884ab16
commit b7156bac7a
@@ -167,19 +167,18 @@ public class XiaomiActivityFileFetcher {
this.awaitingPastResponse = awaiting;
}
public boolean isFetching() {
return isFetching;
}
public void signalComplete() {
LOG.debug("Nothing more to fetch");
final boolean wasFetching = isFetching;
isFetching = false;
queueHeld.set(false);
if (wasFetching) {
mHealthService.getSupport().getDevice().unsetBusyTask();
GB.signalActivityDataFinish(mHealthService.getSupport().getDevice());
GB.updateTransferNotification(null, "", false, 100, mHealthService.getSupport().getContext());
mHealthService.getSupport().getDevice().sendDeviceUpdateIntent(mHealthService.getSupport().getContext());
}
}
public void resumeFetching() {
if (queueHeld.compareAndSet(true, false)) {