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

Commit 55387528 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Don't animate when moving task to stack if not requested

resumeTopActivitiesLocked played an activity transition because
the top activity of the stack changed. We don't want this in
case animate=false in moveToStackLocked, so add it to the
mNoAnimActivities array so it suppresses the animation.

Change-Id: Ife15ca529da916b6bc97e2b3bd1e3c3e3009373b
parent 54b1a6de
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3101,7 +3101,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
                    for (int i = 0; i < count; i++) {
                        moveTaskToStackLocked(tasks.get(i).taskId,
                                FULLSCREEN_WORKSPACE_STACK_ID, ON_TOP, FORCE_FOCUS, "resizeStack",
                                true /* animate */);
                                false /* animate */);
                    }

                    // stack shouldn't contain anymore activities, so nothing to resume.
@@ -3363,6 +3363,10 @@ public final class ActivityStackSupervisor implements DisplayListener {
        final ActivityStack stack = moveTaskToStackUncheckedLocked(
                task, stackId, toTop, forceFocus, "moveTaskToStack:" + reason);

        if (!animate) {
            stack.mNoAnimActivities.add(topActivity);
        }

        // Make sure the task has the appropriate bounds/size for the stack it is in.
        if (stackId == FULLSCREEN_WORKSPACE_STACK_ID && task.mBounds != null) {
            resizeTaskLocked(task, stack.mBounds, RESIZE_MODE_SYSTEM, !PRESERVE_WINDOWS);