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

Commit 31a9c1f4 authored by Evan Rosky's avatar Evan Rosky
Browse files

Make sure an isolated removeTask becomes ready

If this removeTask happens without any consequent actions
(eg. removing a pip task and nothing starts as a result), the
transition system needs to interpret it as ready immediately.

Bug: 339135761
Test: Open netflix video in pip, go to recents and restore netflix
Change-Id: I14bed6164e12bd4d36c24870738188f5e89a4eb1
parent d97268ac
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1704,6 +1704,15 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
        final Transition transit = task.mTransitionController.requestCloseTransitionIfNeeded(task);
        if (transit != null) {
            transit.collectClose(task);
            if (!task.mTransitionController.useFullReadyTracking()) {
                // If a transition was created here, it means this is an isolated removeTask. It's
                // possible for there to be no consequent operations (eg. this is a multiwindow task
                // closing so nothing becomes visible in response) so we must "touch" the old ready
                // tracker so that it doesn't get stuck. However, since the old ready tracker
                // doesn't support multiple conditions, we have to touch it here at the beginning
                // before anything that may need it to wait (setReady(false)).
                transit.setReady(task, true);
            }
        } else if (task.mTransitionController.isCollecting()) {
            task.mTransitionController.getCollectingTransition().collectClose(task);
        }