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

Skip to content
Commit 69e4d0f5 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Extend the for loop to use all samples

Currently, the last sample is treated in a special manner (consistent
with the docs for MotionEvent).
However, the public api of MotionEvent also work fine if the element at
index [historySize] is accessed.

Therefore, calling event.getX() is the same as calling
event.getHistoricalX(historySize).

To simplify the code, remove the redundant code and instead extend the
loop by 1.

Bug: 167946721
Test: atest libinput_tests
Change-Id: Icc1fff1b0f16d63d7d0eb33e5977a3b3b440f562
parent d2ea0d59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment