mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
49b57e955c4cb37e91db77cc4813dd59eaacdc70
When continuing a gesture during quick switch, we cancel the previous animation but don't invalidate it (since the gesture isn't fully finished), and the new gesture handler calls mRecentsView.setOnPageTransitionEndCallback(), so the previous handler will never get STATE_RECENTS_SCROLLING_FINISHED. Thus, continueComputingRecentsScrollIfNecessary() will never end. To fix this, also check !mCanceled, since that is set when continuing the gesture. Also use postOnAnimation() instead of post() since that has better guarantees that the next computation will wait for the next animation frame, rather than whenever the message queue is available, which might happen too frequently. Test: quick switch from A to B and back to A before settling on B, ensure we stop calling computeScroll(). Bug: 153589287 Change-Id: I6b4389ef2cf5a818438c7ae36d8807b3e41c8501
Languages
Java
73.1%
Kotlin
26.5%
AIDL
0.3%
Python
0.1%