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

Commit 51f8ed2a authored by Maryam Dehaini's avatar Maryam Dehaini
Browse files

Do not throw IllegalStateException when second drag to desktop

transition is started

Currently, we throw multiple errors if a second drag to desktop
transition is started (in start, cancel, and finalize drag to desktop
transition). If a swipes from the top while a drag to desktop transition
is currently happening, an error message is thrown since the windowing
mode would not have been set to freeform yet and so the view model
allows another drag to desktop transition to begin.

To fix this issue, this CL makes
DragToDesktopTransitionHandler#startDragToDesktop to return early if a
drag to desktop transition is currently in progress. Finish and cancel
will also return early is a transition is not in progress rather than
returning error to make sure we do not attempt to cancel/finalize a
transition that was never started.

Bug: 315518276
Test: Open task in fullscreen. Swipe down twice quickly and check to see
task animation successfully finishes and no crashes occur.

Change-Id: Ie1730a60393a4c7ef67f064d716d21c4b38bb0cf
parent 9f9c885e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment