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

Commit 07ce6511 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Further refine test for window gone."

parents 151cb90c ccc9e9b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -7688,7 +7688,7 @@ public class WindowManagerService extends IWindowManager.Stub
            // soon won't be visible, to avoid wasting time and funky
            // soon won't be visible, to avoid wasting time and funky
            // changes while a window is animating away.
            // changes while a window is animating away.
            final boolean gone = (behindDream && mPolicy.canBeForceHidden(win, win.mAttrs))
            final boolean gone = (behindDream && mPolicy.canBeForceHidden(win, win.mAttrs))
                    || (win.isGoneForLayoutLw() && !win.isOnScreen());
                    || (win.isGoneForLayoutLw() && !(win.isOnScreen() && win.isDrawFinishedLw()));


            if (DEBUG_LAYOUT && !win.mLayoutAttached) {
            if (DEBUG_LAYOUT && !win.mLayoutAttached) {
                Slog.v(TAG, "1ST PASS " + win
                Slog.v(TAG, "1ST PASS " + win
+12 −1
Original line number Original line Diff line number Diff line
@@ -807,6 +807,17 @@ final class WindowState implements WindowManagerPolicy.WindowState {
                || mExiting || mDestroying;
                || mExiting || mDestroying;
    }
    }


    /**
     * Returns true if the window has a surface that it has drawn a
     * complete UI in to.
     */
    public boolean isDrawFinishedLw() {
        return mHasSurface && !mDestroying &&
                (mWinAnimator.mDrawState == WindowStateAnimator.COMMIT_DRAW_PENDING
                || mWinAnimator.mDrawState == WindowStateAnimator.READY_TO_SHOW
                || mWinAnimator.mDrawState == WindowStateAnimator.HAS_DRAWN);
    }

    /**
    /**
     * Returns true if the window has a surface that it has drawn a
     * Returns true if the window has a surface that it has drawn a
     * complete UI in to.
     * complete UI in to.