Merge "Account for recents animation when reporting client visibility"

This commit is contained in:
Winson Chung
2021-07-16 22:17:27 +00:00
committed by Android (Google) Code Review

View File

@@ -4842,7 +4842,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
final boolean usingShellTransitions =
mAtmService.getTransitionController().getTransitionPlayer() != null;
final boolean delayed = isAnimating(PARENTS | CHILDREN,
ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_WINDOW_ANIMATION);
ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_WINDOW_ANIMATION
| ANIMATION_TYPE_RECENTS);
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,
@@ -4862,7 +4863,7 @@ 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)
if (visible || !isAnimating(PARENTS, ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_RECENTS)
|| usingShellTransitions) {
setClientVisible(visible);
}