summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueThreadState.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2018-10-24 21:42:51 -0700
committer Siarhei Vishniakou <svv@google.com> 2018-10-24 21:42:51 -0700
commit0bd17d38e490532c0449cf61bbe65922a80b8ee6 (patch)
treed109955aab57ced562446a595aad3b9361d8ed18 /libs/gui/BufferQueueThreadState.cpp
parent369e0148fa7d9ee258ab19e912798f98f4456dde (diff)
Do not use raw coordinates in VelocityTracker
In P, we switched VelocityTracker to use raw coordinates when calculating the velocity. While that helped solve the issues with views being moved while touched, this has broken some other assumptions in the view hierarchy. Currently during dispatch, MotionEvent coordinates are getting adjusted as events are passed to the child views. One example is a rotated ListView. When setRotation is called on a ListView, ListView continues to use getYVelocity to determine the fling speed. However, after the view is rotated, it's action is in the horizontal direction. This causes flings on ListView to not work properly. Further analysing the View system api, it appears that the problem could also occur in such cases as scale, where the view gets increased in size, and MotionEvents are adjusted accordingly. This issue could have been solved in the view hierarchy by changing the assumptions and reworking the VelocityTracker usage. However, that is deemed infeasible. The switch to raw coordinates was to resolve the issue when a moving view is trying to calculate the velocity of the fling. Since that no longer is possible, we will have to use work-arounds for those use cases. One such example is the SystemUI use case, that is fixed in this topic. Bug: 117921784 Bug: 117475766 Test: Sample app from bug 117475766, flings in the horizontal direction work properly Change-Id: If4cd6ace0bbef52521e1bbab8d58d649b295e2b7
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
0 files changed, 0 insertions, 0 deletions