mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
Another place to handle possible negative steps values
This commit is contained in:
parent
aee0e54d05
commit
add9be5ff6
@ -74,7 +74,11 @@ public abstract class RealtimeSamplesSupport {
|
||||
}
|
||||
|
||||
public synchronized void setSteps(int stepsPerMinute) {
|
||||
this.steps = stepsPerMinute;
|
||||
if (stepsPerMinute == ActivitySample.NOT_MEASURED || stepsPerMinute >= 0) {
|
||||
this.steps = stepsPerMinute;
|
||||
} else {
|
||||
this.steps = ActivitySample.NOT_MEASURED;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user