Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e88c927 authored by Gaurav Bhola's avatar Gaurav Bhola
Browse files

Ensure that window gets to a drawn state

- With legacy transitions the window draw state doesn't to change to
  HAS_DRAWN. performShowLocked() needs to complete to change the draw
  state.
- isReadyForDisplay() should return true even when mToken.isVisible()
  return false

Flag: EXEMPT (Bug fix)
Fix: 359783169
Bug: 338426357
Test: atest
Change-Id: I6902178168250be9949af1d367bd4a02982508c3
parent 17ed26ef
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1969,6 +1969,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    boolean isReadyForDisplay() {
        final boolean parentAndClientVisible = !isParentWindowHidden()
                && mViewVisibility == View.VISIBLE;
        // TODO(b/338426357): Remove this once the last target using legacy transitions is moved to
        // shell transitions
        if (!mTransitionController.isShellTransitionsEnabled()) {
            return mHasSurface && isVisibleByPolicy() && !mDestroying
                    && ((parentAndClientVisible && mToken.isVisible())
                    || isAnimating(TRANSITION | PARENTS));
        }
        return mHasSurface && isVisibleByPolicy() && !mDestroying && mToken.isVisible()
                && (parentAndClientVisible || isAnimating(TRANSITION | PARENTS));
    }