mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-17 12:56:48 +01:00
Huawei: Fix for sample provider
This commit is contained in:
parent
d4033dbccb
commit
cc16906d20
@ -366,8 +366,8 @@ public class HuaweiSampleProvider extends AbstractSampleProvider<HuaweiActivityS
|
|||||||
lastHr = ActivitySample.NOT_MEASURED;
|
lastHr = ActivitySample.NOT_MEASURED;
|
||||||
|
|
||||||
currentIndex += 1;
|
currentIndex += 1;
|
||||||
if (currentIndex > processedSamples.size())
|
if (currentIndex >= processedSamples.size())
|
||||||
return;
|
return; // We cannot add the data to any samples, so we might as well return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update data
|
// Update data
|
||||||
@ -452,8 +452,8 @@ public class HuaweiSampleProvider extends AbstractSampleProvider<HuaweiActivityS
|
|||||||
lastHr = ActivitySample.NOT_MEASURED;
|
lastHr = ActivitySample.NOT_MEASURED;
|
||||||
|
|
||||||
currentIndex += 1;
|
currentIndex += 1;
|
||||||
if (currentIndex > processedSamples.size())
|
if (currentIndex >= processedSamples.size())
|
||||||
return;
|
return; // We cannot add the data to any samples, so we might as well return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workoutSamples.get(i).getHeartRate() != ActivitySample.NOT_MEASURED)
|
if (workoutSamples.get(i).getHeartRate() != ActivitySample.NOT_MEASURED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user