include/input/AccelerationCurve.h
0 → 100644
+49
−0
libs/input/AccelerationCurve.cpp
0 → 100644
+63
−0
+1
−0
+146
−64
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
The new touchpad mapper implemented in Android 14 replaced our simple
cursor movement acceleration curves (where the acceleration factor
increased linearly with speed between minimum and maximum values) with
more sophisticated multi-segment curves. However, cursor movement using
mice remained on the old curves. For consistency and to improve pointing
accuracy, use the same curves for mice, too.
This is also a good opportunity to improve the documentation comments
and naming now that I've wrapped my head around the maths a bit better.
Bug: 315313622
Test: atest inputflinger_tests
Test: check pointer movement with a mouse, including changing the
pointer speed setting and checking that the movement speed changes
Change-Id: Ifcf43f4de6017f06b66f37d5e03a13cc257d92d5