@@ -7391,11 +7391,8 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
73917391 final int N = mWindows .size ();
73927392 int i ;
73937393
7394- if (DEBUG_LAYOUT ) {
7395- Slog .v (TAG , "-------------------------------------" );
7396- Slog .v (TAG , "performLayout: needed="
7397- + mLayoutNeeded + " dw=" + dw + " dh=" + dh );
7398- }
7394+ if (DEBUG_LAYOUT ) Slog .v (TAG , "performLayout: needed="
7395+ + mLayoutNeeded + " dw=" + dw + " dh=" + dh );
73997396
74007397 mPolicy .beginLayoutLw (dw , dh , mRotation );
74017398
@@ -7412,20 +7409,19 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74127409 // Don't do layout of a window if it is not visible, or
74137410 // soon won't be visible, to avoid wasting time and funky
74147411 // changes while a window is animating away.
7415- final boolean gone = win .isGoneForLayoutLw ();
7412+ final AppWindowToken atoken = win .mAppToken ;
7413+ final boolean gone = win .mViewVisibility == View .GONE
7414+ || !win .mRelayoutCalled
7415+ || (atoken == null && win .mRootToken .hidden )
7416+ || (atoken != null && atoken .hiddenRequested )
7417+ || win .mAttachedHidden
7418+ || win .mExiting || win .mDestroying ;
74167419
74177420 if (DEBUG_LAYOUT && !win .mLayoutAttached ) {
7418- Slog .v (TAG , "1ST PASS " + win
7421+ Slog .v (TAG , "First pass " + win
74197422 + ": gone=" + gone + " mHaveFrame=" + win .mHaveFrame
74207423 + " mLayoutAttached=" + win .mLayoutAttached );
7421- final AppWindowToken atoken = win .mAppToken ;
7422- if (gone ) Slog .v (TAG , " GONE: mViewVisibility="
7423- + win .mViewVisibility + " mRelayoutCalled="
7424- + win .mRelayoutCalled + " hidden="
7425- + win .mRootToken .hidden + " hiddenRequested="
7426- + (atoken != null && atoken .hiddenRequested )
7427- + " mAttachedHidden=" + win .mAttachedHidden );
7428- else Slog .v (TAG , " VIS: mViewVisibility="
7424+ if (gone ) Slog .v (TAG , " (mViewVisibility="
74297425 + win .mViewVisibility + " mRelayoutCalled="
74307426 + win .mRelayoutCalled + " hidden="
74317427 + win .mRootToken .hidden + " hiddenRequested="
@@ -7447,7 +7443,7 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74477443 win .prelayout ();
74487444 mPolicy .layoutWindowLw (win , win .mAttrs , null );
74497445 win .mLayoutSeq = seq ;
7450- if (DEBUG_LAYOUT ) Slog .v (TAG , " LAYOUT: mFrame="
7446+ if (DEBUG_LAYOUT ) Slog .v (TAG , "-> mFrame="
74517447 + win .mFrame + " mContainingFrame="
74527448 + win .mContainingFrame + " mDisplayFrame="
74537449 + win .mDisplayFrame );
@@ -7465,7 +7461,7 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74657461 WindowState win = mWindows .get (i );
74667462
74677463 if (win .mLayoutAttached ) {
7468- if (DEBUG_LAYOUT ) Slog .v (TAG , "2ND PASS " + win
7464+ if (DEBUG_LAYOUT ) Slog .v (TAG , "Second pass " + win
74697465 + " mHaveFrame=" + win .mHaveFrame
74707466 + " mViewVisibility=" + win .mViewVisibility
74717467 + " mRelayoutCalled=" + win .mRelayoutCalled );
@@ -7483,7 +7479,7 @@ private final int performLayoutLockedInner(boolean initial, boolean updateInputW
74837479 win .prelayout ();
74847480 mPolicy .layoutWindowLw (win , win .mAttrs , win .mAttachedWindow );
74857481 win .mLayoutSeq = seq ;
7486- if (DEBUG_LAYOUT ) Slog .v (TAG , " LAYOUT: mFrame="
7482+ if (DEBUG_LAYOUT ) Slog .v (TAG , "-> mFrame="
74877483 + win .mFrame + " mContainingFrame="
74887484 + win .mContainingFrame + " mDisplayFrame="
74897485 + win .mDisplayFrame );
0 commit comments