mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Another place to handle possible negative steps values
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user