1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-23 18:36:50 +01:00

Huawei: Fix for sample provider

This commit is contained in:
Martin.JM 2024-10-26 22:17:54 +02:00 committed by José Rebelo
parent d4033dbccb
commit cc16906d20

View File

@ -366,8 +366,8 @@ public class HuaweiSampleProvider extends AbstractSampleProvider<HuaweiActivityS
lastHr = ActivitySample.NOT_MEASURED;
currentIndex += 1;
if (currentIndex > processedSamples.size())
return;
if (currentIndex >= processedSamples.size())
return; // We cannot add the data to any samples, so we might as well return
}
// Update data
@ -452,8 +452,8 @@ public class HuaweiSampleProvider extends AbstractSampleProvider<HuaweiActivityS
lastHr = ActivitySample.NOT_MEASURED;
currentIndex += 1;
if (currentIndex > processedSamples.size())
return;
if (currentIndex >= processedSamples.size())
return; // We cannot add the data to any samples, so we might as well return
}
if (workoutSamples.get(i).getHeartRate() != ActivitySample.NOT_MEASURED)