diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java index bb65da3deade..50ba8975802b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java @@ -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); |