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

Commit 26ca5ef9 authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge "De-flake testFakeControlTarget_overrideVisibilityReceivedByWindows" into main

parents f7ea58ec 2d7c4996
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -411,6 +411,10 @@ public class InsetsPolicyTest extends WindowTestsBase {
        app2.mAboveInsetsState.addSource(statusBarSource);
        app2.mAboveInsetsState.addSource(statusBarSource);
        assertTrue(app2.getInsetsState().peekSource(statusBarId).isVisible());
        assertTrue(app2.getInsetsState().peekSource(statusBarId).isVisible());


        // Let app2 be the focused window. Otherwise, the control target could be overwritten by
        // DisplayPolicy#updateSystemBarAttributes unexpectedly.
        mDisplayContent.getDisplayPolicy().focusChangedLw(null, app2);

        app2.setRequestedVisibleTypes(0, navigationBars() | statusBars());
        app2.setRequestedVisibleTypes(0, navigationBars() | statusBars());
        mDisplayContent.getInsetsPolicy().updateBarControlTarget(app2);
        mDisplayContent.getInsetsPolicy().updateBarControlTarget(app2);
        waitUntilWindowAnimatorIdle();
        waitUntilWindowAnimatorIdle();