Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e78b9e0 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Switch to impulse VelocityTracker strategy

Switch from lsq2 to impulse strategy for VelocityTracker.

Bug: 69069303
Test: flings in SystemUI and Google Maps with 1 and 2 fingers on both
Pixel 2 and Pixel 2 XL devices.
VelocityTracker_test currently fails 8 pre-recorded flings on Pixel, and
will be updated after this change has soaked in dogfood. The flings will
need to be re-recorded. Currently, in all 8 instances the reported
velocity is more than 20% smaller in magnitude than expected velocity.
m -j inputflinger_tests_InputReader_test
inputflinger_tests_InputDispatcher_test libinput_tests_InputChannel_test
libinput_tests_InputEvent_test
libinput_tests_InputPublisherAndConsumer_test
libinput_tests_VelocityTracker_test && adb push
out/target/product/$TARGET_PRODUCT/data/nativetest64/*
/data/nativetest64/
Then run test binaries on the device.

Change-Id: I952fdfdc4ecd21cdfa50ec388af7f98d1b0d8cbe
parent c4257d27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static std::string matrixToString(const float* a, uint32_t m, uint32_t n, bool r
// this is the strategy that applications will actually use.  Be very careful
// when adjusting the default strategy because it can dramatically affect
// (often in a bad way) the user experience.
const char* VelocityTracker::DEFAULT_STRATEGY = "lsq2";
const char* VelocityTracker::DEFAULT_STRATEGY = "impulse";

VelocityTracker::VelocityTracker(const char* strategy) :
        mLastEventTime(0), mCurrentPointerIdBits(0), mActivePointerId(-1) {