1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 06:22:55 +01:00

Another place to handle possible negative steps values

This commit is contained in:
cpfeiffer 2018-09-11 23:24:27 +02:00
parent aee0e54d05
commit add9be5ff6

View File

@ -74,7 +74,11 @@ public abstract class RealtimeSamplesSupport {
} }
public synchronized void setSteps(int stepsPerMinute) { public synchronized void setSteps(int stepsPerMinute) {
if (stepsPerMinute == ActivitySample.NOT_MEASURED || stepsPerMinute >= 0) {
this.steps = stepsPerMinute; this.steps = stepsPerMinute;
} else {
this.steps = ActivitySample.NOT_MEASURED;
}
} }
/** /**