From 7a4d1368c4c8d46c661c503aa44bfcb8a5d5fcb3 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Wed, 15 Sep 2021 02:54:33 +0000 Subject: [PATCH] Fix a bad merge A previous merge went in that incorrectly removed this part of another change (I993dad973ea4b273f77df5671a93cbfd9b21e808). This CL is undoing that. Bug: 183993924 Change-Id: I107e80dd733fb93d829c04a8076d9a1690547fd0 Test: atest ActivityLifecycleTests with shell transitions enabled --- .../core/java/com/android/server/wm/ActivityRecord.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 605cb8a088e7b..7f12fffa554ca 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -4934,10 +4934,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A * this has become invisible. */ private void postApplyAnimation(boolean visible) { + final boolean usingShellTransitions = + mAtmService.getTransitionController().getTransitionPlayer() != null; final boolean delayed = isAnimating(PARENTS | CHILDREN, ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_WINDOW_ANIMATION | ANIMATION_TYPE_RECENTS); - if (!delayed) { + if (!delayed && !usingShellTransitions) { // We aren't delayed anything, but exiting windows rely on the animation finished // callback being called in case the ActivityRecord was pretending to be delayed, // which we might have done because we were in closing/opening apps list. @@ -4956,8 +4958,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // updated. // If we're becoming invisible, update the client visibility if we are not running an // animation. Otherwise, we'll update client visibility in onAnimationFinished. - if (visible || !isAnimating(PARENTS, - ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_RECENTS)) { + if (visible || !isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_RECENTS) + || usingShellTransitions) { setClientVisible(visible); }