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

Commit 5742d6b0 authored by Evan Rosky's avatar Evan Rosky
Browse files

Keep z-order of tasks when merged into recents transition

This keeps the z-order of incoming tasks during merge the same
as WM. This way, translucent tasks will still draw above their
siblings.

Bug: 289131212
Test: use 3p launcher, open translucent task, switch to opaque
      task, enter recents and then hot-launch the translucent
      task.
Change-Id: I75dc9972b0651f93d0f5c505b90493761cae0843
parent f619577c
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -581,7 +581,9 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
            final TransitionUtil.LeafTaskFilter leafTaskFilter =
            final TransitionUtil.LeafTaskFilter leafTaskFilter =
                    new TransitionUtil.LeafTaskFilter();
                    new TransitionUtil.LeafTaskFilter();
            boolean hasTaskChange = false;
            boolean hasTaskChange = false;
            for (int i = 0; i < info.getChanges().size(); ++i) {
            // Walk backwards so that higher z-order changes are recorded *last* in the assorted
            // task lists. This way, when the are added, the on-top tasks are drawn on top.
            for (int i = info.getChanges().size() - 1; i >= 0; --i) {
                final TransitionInfo.Change change = info.getChanges().get(i);
                final TransitionInfo.Change change = info.getChanges().get(i);
                final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo();
                final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo();
                if (taskInfo != null
                if (taskInfo != null