Ignore insets provider visibility when checking performLayout

When the client calls relayout, it will not check the insets provider
visibility. Because of that, we also shouldn't check that value when
calling  isGoneForLayoutLw. Otherwise, we could end up requesting to
relayout, but never be able to execute the performLayout.

Test: 1. Open app and rotate to landscape
      2. Lock screen
      3. Rotate to portrait and unlock
      4. NavigationBar has mEnterAnimationPending set to false
Fixes: 152537982
Change-Id: I3ce4672636d27a9940aef93a5a73a69c4896fa20
This commit is contained in:
chaviw
2020-05-27 15:57:07 -07:00
parent 2046776127
commit 7aec231aca

View File

@@ -1784,7 +1784,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
final ActivityRecord atoken = mActivityRecord;
return mViewVisibility == View.GONE
|| !mRelayoutCalled
|| (atoken == null && !mToken.isVisible())
// We can't check isVisible here because it will also check the client visibility
// for WindowTokens. Even if the client is not visible, we still need to perform
// a layout since they can request relayout when client visibility is false.
// TODO (b/157682066) investigate if we can clean up isVisible
|| (atoken == null && !(wouldBeVisibleIfPolicyIgnored() && isVisibleByPolicy()))
|| (atoken != null && !atoken.mVisibleRequested)
|| isParentWindowGoneForLayout()
|| (mAnimatingExit && !isAnimatingLw())