mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 04:46:51 +01:00
Garmin: Fix multiple FitAsyncProcessor running in parallel
This commit is contained in:
parent
14d76cf59b
commit
ea41bbd1a9
@ -545,7 +545,9 @@ public class GarminSupport extends AbstractBTLEDeviceSupport implements ICommuni
|
||||
return;
|
||||
}
|
||||
|
||||
// Keep the device marked as busy while we process the files asynchronously
|
||||
// Keep the device marked as busy while we process the files asynchronously, but unset
|
||||
// isBusyFetching so we do not start multiple processors
|
||||
isBusyFetching = false;
|
||||
|
||||
final FitAsyncProcessor fitAsyncProcessor = new FitAsyncProcessor(getContext(), getDevice());
|
||||
final long[] lastNotificationUpdateTs = new long[]{System.currentTimeMillis()};
|
||||
@ -569,7 +571,6 @@ public class GarminSupport extends AbstractBTLEDeviceSupport implements ICommuni
|
||||
GB.signalActivityDataFinish(getDevice());
|
||||
GB.updateTransferNotification(null, "", false, 100, getContext());
|
||||
getDevice().sendDeviceUpdateIntent(getContext());
|
||||
isBusyFetching = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.fit;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -15,8 +14,6 @@ import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.PendingFileProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.deviceevents.FileDownloadedDeviceEvent;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
public class FitAsyncProcessor {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(FitAsyncProcessor.class);
|
||||
|
Loading…
Reference in New Issue
Block a user