mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Xiaomi-protobuf: Do not signal new activity data if we were not fetching
Might fix #6338
This commit is contained in:
+3
-4
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user