Increase accurate tool jank for motion predictor
We have received a report that the prediction can be very
conservative at high speeds; after analising the jank values
at high speed, it seems that the threshold that was picked (0.2)
is too low.
This CL increases the value to 0.7 since it seems to be good for
high speed straight lines. A better way to computer perceived
errors will be implemented later.
Bug: 232941452
Test: Built, tested on sample app
Change-Id: Ic9509f7de25b27c23c62b8962c09c32d6a39d1df
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 61669c5..81abf52 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
@@ -50,7 +50,7 @@
private static final float LOW_JANK = 0.02f;
private static final float HIGH_JANK = 0.2f;
private static final float ACCURATE_LOW_JANK = 0.1f;
- private static final float ACCURATE_HIGH_JANK = 0.2f;
+ private static final float ACCURATE_HIGH_JANK = 0.7f;
// Range of pen speed to expect (in dp / ms).
// Low value will not use prediction, high value will use full prediction.