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

Skip to content
Commit 49b57e95 authored by Tony Wickham's avatar Tony Wickham
Browse files

Fix continueComputingRecentsScrollIfNecessary() running infinitely

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
parent e6843777
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment