1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-26 16:43:29 +02: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) {
this.steps = stepsPerMinute; if (stepsPerMinute == ActivitySample.NOT_MEASURED || stepsPerMinute >= 0) {
this.steps = stepsPerMinute;
} else {
this.steps = ActivitySample.NOT_MEASURED;
}
} }
/** /**