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
Loading
Please register or sign in to comment