Merge "Accept a Window as shown if it's in any transition" into tm-qpr-dev am: 0af487566d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21852902

Change-Id: Ib8e2656cafcbd2fac70b235742a57f6899414020
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Robin Lee
2023-03-21 08:08:41 +00:00
committed by Automerger Merge Worker

View File

@@ -2049,16 +2049,19 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
/** /**
* Like isOnScreen(), but we don't return true if the window is part * Like isOnScreen(), but we don't return true if the window is part
* of a transition that has not yet been started. * of a transition but has not yet started animating.
*/ */
boolean isReadyForDisplay() { boolean isReadyForDisplay() {
if (mToken.waitingToShow && getDisplayContent().mAppTransition.isTransitionSet()) { if (!mHasSurface || mDestroying || !isVisibleByPolicy()) {
return false;
}
if (mToken.waitingToShow && getDisplayContent().mAppTransition.isTransitionSet()
&& !isAnimating(TRANSITION | PARENTS, ANIMATION_TYPE_APP_TRANSITION)) {
return false; return false;
} }
final boolean parentAndClientVisible = !isParentWindowHidden() final boolean parentAndClientVisible = !isParentWindowHidden()
&& mViewVisibility == View.VISIBLE && mToken.isVisible(); && mViewVisibility == View.VISIBLE && mToken.isVisible();
return mHasSurface && isVisibleByPolicy() && !mDestroying return parentAndClientVisible || isAnimating(TRANSITION | PARENTS, ANIMATION_TYPE_ALL);
&& (parentAndClientVisible || isAnimating(TRANSITION | PARENTS));
} }
boolean isFullyTransparent() { boolean isFullyTransparent() {