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

Commit 6a41c383 authored by Yunfan Chen's avatar Yunfan Chen Committed by Android (Google) Code Review
Browse files

Merge "Fix testLandscapeSeascapeRotationByApp failure"

parents 4f7ff383 0530fe78
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -141,6 +141,7 @@ public class AppWindowTokenTests extends WindowTestsBase {
        mToken.removeImmediately();
        mToken.removeImmediately();
    }
    }


    @FlakyTest(detail = "Promote to presubmit when shown to be stable.")
    @Test
    @Test
    public void testLandscapeSeascapeRotationByApp() {
    public void testLandscapeSeascapeRotationByApp() {
        // Some plumbing to get the service ready for rotation updates.
        // Some plumbing to get the service ready for rotation updates.
@@ -166,6 +167,8 @@ public class AppWindowTokenTests extends WindowTestsBase {
        mDisplayContent.updateOrientationFromAppTokens(
        mDisplayContent.updateOrientationFromAppTokens(
                mDisplayContent.getRequestedOverrideConfiguration(),
                mDisplayContent.getRequestedOverrideConfiguration(),
                null /* freezeThisOneIfNeeded */, false /* forceUpdate */);
                null /* freezeThisOneIfNeeded */, false /* forceUpdate */);
        // In this test, DC will not get config update. Set the waiting flag to false.
        mDisplayContent.mWaitingForConfig = false;
        mWm.mRoot.performSurfacePlacement(false /* recoveringMemory */);
        mWm.mRoot.performSurfacePlacement(false /* recoveringMemory */);
        assertEquals(SCREEN_ORIENTATION_REVERSE_LANDSCAPE, mDisplayContent.getLastOrientation());
        assertEquals(SCREEN_ORIENTATION_REVERSE_LANDSCAPE, mDisplayContent.getLastOrientation());
        assertTrue(appWindow.mResizeReported);
        assertTrue(appWindow.mResizeReported);