[1/N] Cancel DragToDesktop on incoming transition if bookend requested
The DragToDesktop transition is a book-end transition, meaning it starts
a transition (start-drag), and then continues running until we receive a
merge-request from a set of available (book-end) transitions
(cancel-drag, and end-drag).
Book-end transitions can cause deadlocks when an unknown transition is
ready before the book-end transition. This happens if we do not handle
the merge-request from the unknown transition - since that transition
will then block the transition queue (including the book-end
transition), and the overall transition will never finish.
To avoid such deadlocks we here cancel the DragToDesktop transition if
we receive a merge-request from an unknown transition (before the
merge-request for our own book-end transition).
Out of the cases below, we only handle case nr.2 in this CL (case nr.3
should be handled in the same way before and after this CL). Here
BOOKEND means END or CANCEL):
1. START -> UNKNOWN -> finish START, finish UNKNOWN
2. START -> request BOOKEND -> UNKNOWN -> finish START, finish UNKNOWN,
start + finish BOOKEND
- the BOOKEND transition here runs on its own (it can't be merged
into START)
- the user is taken to the result of BOOKEND (fullscreen/split for
CANCEL, desktop for END)
3. START -> request + merge BOOKEND -> UNKNOWN -> finish BOOKEND, finish
UNKNOWN
- here we ignore the UNKNOWN transition since we know BOOKEND will
finish once its animation is done.
- the user is taken to the result of BOOKEND (fullscreen/split for
CANCEL, desktop for END)
Test: launch a half-transparent activity during drag-to-desktop
Bug: 397135730
Bug: 397497184
Flag: com.android.window.flags.enable_drag_to_desktop_incoming_transitions_bugfix
Change-Id: Ied74b9f29bd93bc7d77872a67b73ffa23185c983
Loading
Please register or sign in to comment