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

Commit 7aec231a authored by chaviw's avatar chaviw
Browse files

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
parent 20467761
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -1784,7 +1784,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        final ActivityRecord atoken = mActivityRecord;
        final ActivityRecord atoken = mActivityRecord;
        return mViewVisibility == View.GONE
        return mViewVisibility == View.GONE
                || !mRelayoutCalled
                || !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)
                || (atoken != null && !atoken.mVisibleRequested)
                || isParentWindowGoneForLayout()
                || isParentWindowGoneForLayout()
                || (mAnimatingExit && !isAnimatingLw())
                || (mAnimatingExit && !isAnimatingLw())