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

Commit 47c88876 authored by Winson Chung's avatar Winson Chung
Browse files

Fix regression with the closing task leash visibility

- We should actually be showing the transition leash if it was
  previously closing and not hiding it
- There's another case where we hide the opening task surface when
  setting up for the transition, we need to also override this alpha
  if the task was previously visible

Bug: 296242449
Test: Quickswitch quickly between tasks such that we relaunch a pausing/
      closed task
Change-Id: I1416eb261ba9016174f1deefd293d58f64ab05ed
parent 90195666
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -738,8 +738,17 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
                        final boolean wasClosing = closingIdx >= 0;
                        t.reparent(target.leash, mInfo.getRoot(rootIdx).getLeash());
                        t.setLayer(target.leash, layer);
                        // Hide the animation leash if not already visible, let listener show it
                        t.setVisibility(target.leash, !wasClosing);
                        if (wasClosing) {
                            // App was previously visible and is closing
                            t.show(target.leash);
                            t.setAlpha(target.leash, 1f);
                            // Also override the task alpha as it was set earlier when dispatching
                            // the transition and setting up the leash to hide the
                            t.setAlpha(change.getLeash(), 1f);
                        } else {
                            // Hide the animation leash, let the listener show it
                            t.hide(target.leash);
                        }
                        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                                "  opening new leaf taskId=%d wasClosing=%b",
                                target.taskId, wasClosing);