Adjust prediction jank thresholds
After the accuracy jank and speed threshold were introduced, I
spent some time trying different values to fine tune the
prediction to balance performance and errors.
Bug: 232941452
Test: Built, tested on sample app
Change-Id: Ie5e84415cac6ac1c0883693e5c059b9e2e3114ed
diff --git a/input/input-motionprediction/src/main/java/androidx/input/motionprediction/kalman/SinglePointerPredictor.java b/input/input-motionprediction/src/main/java/androidx/input/motionprediction/kalman/SinglePointerPredictor.java
index 90eddf7..61669c5 100644
--- a/input/input-motionprediction/src/main/java/androidx/input/motionprediction/kalman/SinglePointerPredictor.java
+++ b/input/input-motionprediction/src/main/java/androidx/input/motionprediction/kalman/SinglePointerPredictor.java
@@ -49,8 +49,8 @@
// Low value will use maximum prediction, high value will use no prediction.
private static final float LOW_JANK = 0.02f;
private static final float HIGH_JANK = 0.2f;
- private static final float ACCURATE_LOW_JANK = 0.2f;
- private static final float ACCURATE_HIGH_JANK = 1f;
+ private static final float ACCURATE_LOW_JANK = 0.1f;
+ private static final float ACCURATE_HIGH_JANK = 0.2f;
// Range of pen speed to expect (in dp / ms).
// Low value will not use prediction, high value will use full prediction.