diff options
| author | 2019-07-16 17:43:15 +0200 | |
|---|---|---|
| committer | 2019-07-25 16:08:21 +0000 | |
| commit | 07f7d1947af6ceecb19fccf9ae44e88bae6b3f57 (patch) | |
| tree | 30fb1502e938e18e407571b6a74f95f52ee98e8e | |
| parent | a00ebe4606daafeb0f9daa16d800c523cf1588b8 (diff) | |
Only consider gone for layout if parent is gone for layout
If we check getParentWindowHidden, that determines mostly actual
visibility. However, we don't want that because we still would
like to follow the parent's window layout lifecycle, as otherwise
we may be stuck in a transition in case the parent window is
hidden but the child is waiting for a layout to happen.
Test: Click "Customize" on wallpaper picker, go back, ensure no
transition timeout
Fixes: 135976008
Change-Id: I66aeab29a81cd82b170aaf337249616b1f559848
(cherry picked from commit b52b0457e1bad14697341cb81f6d391755b009be)
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 7 |
1 files changed, 6 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 c6c9e1b39db4..dcf0f8a99883 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1611,7 +1611,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP || !mRelayoutCalled || (atoken == null && mToken.isHidden()) || (atoken != null && atoken.hiddenRequested) - || isParentWindowHidden() + || isParentWindowGoneForLayout() || (mAnimatingExit && !isAnimatingLw()) || mDestroying; } @@ -3764,6 +3764,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return parent != null && parent.mHidden; } + private boolean isParentWindowGoneForLayout() { + final WindowState parent = getParentWindow(); + return parent != null && parent.isGoneForLayoutLw(); + } + void setWillReplaceWindow(boolean animate) { for (int i = mChildren.size() - 1; i >= 0; i--) { final WindowState c = mChildren.get(i); |