summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index ae21174583d2..46d6009b9ab8 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -1790,7 +1790,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
final ActivityRecord atoken = mActivityRecord;
return mViewVisibility == View.GONE
|| !mRelayoutCalled
- || (atoken == null && !mToken.isVisible())
+ // We can't check isVisible here because it will also check the client visibility
+ // for WindowTokens. Even if the client is not visible, we still need to perform
+ // a layout since they can request relayout when client visibility is false.
+ // TODO (b/157682066) investigate if we can clean up isVisible
+ || (atoken == null && !(wouldBeVisibleIfPolicyIgnored() && isVisibleByPolicy()))
|| (atoken != null && !atoken.mVisibleRequested)
|| isParentWindowGoneForLayout()
|| (mAnimatingExit && !isAnimatingLw())