Only consider hiddenRequested when deciding layout

This change removes the test for hidden when deciding whether to
do a layout. So layout begins as soon as hiddenRequested occurs.
Since hidden is cleared when animations starts considering hidden
in the layout decision will delay layout until it is too late.

In particular we were not executing a relayout on return to an
activity even though the screen had been rotated while away.

Fixes bug 6615859.

Change-Id: I5fb0b4bf2c253b910a7a192da04419236d8f09d9
This commit is contained in:
Craig Mautner
2012-09-12 16:13:59 -07:00
parent f008ab727e
commit c516a5c58f

View File

@@ -806,7 +806,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
return mViewVisibility == View.GONE
|| !mRelayoutCalled
|| (atoken == null && mRootToken.hidden)
|| (atoken != null && (atoken.hiddenRequested || atoken.hidden))
|| (atoken != null && atoken.hiddenRequested)
|| mAttachedHidden
|| mExiting || mDestroying;
}