Files
frameworks_base/core/java/android/widget
Tang Ding 2076ef9768 FIx issue:
https://issuetracker.google.com/issues/183024999

There's a performance issue during continually scroll listview when listview in Fling state .
Consider such scene as blew:
1.Listview holds a lots of data
2.mTouchMode in TOUCH_MODE_FLING state.
3.Touch Event delivery down event to listview , mTouchMode change to TOUCH_MODE_SCROLL , post checkFlyWheel(40ms timeout). move event make checkFlywheel.endFling()  delay  to execute  , before endFling() satisfied to execute up event occured, flingrunnable.start() will post a extra FlingRunnable in onTouchUp().

Finally Choreographer.CallbackQueue will get more and more FlingRunnable animation callback when keep repeating  above steps#3, Choreographer#doFrame#animation will  execute FlingRunnbale N times per frame , it will greater than vsync period cause jank (N means repeat steps#3 times). 

Solution:
Remove unnecessary FlingRunnable before add FlingRunnable.

Change-Id: I2cbab9171ffbaad87a8908eef09f813cf89ad85a
2021-03-18 13:53:23 +00:00
..
2021-03-18 13:53:23 +00:00
2021-03-15 17:38:18 +00:00
2020-04-03 08:48:00 +01:00