Address review comments

This commit is contained in:
Ingvar Stepanyan
2026-06-06 21:26:51 +02:00
committed by José Rebelo
parent 3d48db83c9
commit 9229239e7e
2 changed files with 8 additions and 6 deletions
@@ -744,7 +744,7 @@ class ExploreSyncHandler {
}
final GarminActivitySampleProvider provider
= new GarminActivitySampleProvider(deviceSupport.getDevice(), daoSession);
provider.addGBActivitySamples(samples.toArray(new GarminActivitySample[0]));
provider.addGBActivitySamples(samples);
LOG.debug("ExploreSync line {}: persisted {} activity samples",
uuidHex, samples.size());
}
@@ -544,11 +544,13 @@ public class GarminSupport extends AbstractBTLESingleDeviceSupport implements IC
// otherwise we might get incomplete monitor files
sendOutgoingMessage("fetch recorded data", fileTransferHandler.initiateDownload());
// Re-arm the ExploreSync historical catalog walk so any activities
// recorded since the initial connect get picked up. Watches that
// don't support the service reject our StartSyncRequest and the
// handler tears the session down on its own.
protocolBufferHandler.getExploreSyncHandler().startSession();
if (getCoordinator().supports(getDevice(), GarminCapability.EXPLORE_SYNC)) {
// Re-arm the ExploreSync historical catalog walk so any activities
// recorded since the initial connect get picked up. Watches that
// don't support the service reject our StartSyncRequest and the
// handler tears the session down on its own.
protocolBufferHandler.getExploreSyncHandler().startSession();
}
//TODO: ask the watch to initiate the sync? Something like:
// sendOutgoingMessage("set sync ready", new SystemEventMessage(SystemEventMessage.GarminSystemEventType.SYNC_READY, 0));