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

Commit fefd62ca authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix flaky testForAllWinddow"

parents a1dea5f9 6dd9a627
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -61,7 +61,6 @@ import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
import android.platform.test.annotations.Presubmit;
import android.util.DisplayMetrics;
import android.util.DisplayMetrics;
import android.view.DisplayCutout;
import android.view.DisplayCutout;
import android.view.DisplayInfo;
import android.view.Gravity;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.Surface;
@@ -87,18 +86,22 @@ import java.util.List;
 * Tests for the {@link DisplayContent} class.
 * Tests for the {@link DisplayContent} class.
 *
 *
 * Build/Install/Run:
 * Build/Install/Run:
 *  atest FrameworksServicesTests:DisplayContentTests
 *  atest WmTests:DisplayContentTests
 */
 */
@SmallTest
@SmallTest
@Presubmit
@Presubmit
public class DisplayContentTests extends WindowTestsBase {
public class DisplayContentTests extends WindowTestsBase {


    @Test
    @Test
    @FlakyTest(bugId = 77772044)
    @FlakyTest(detail = "Promote to presubmit when shown to be stable.")
    public void testForAllWindows() {
    public void testForAllWindows() {
        final WindowState exitingAppWindow = createWindow(null, TYPE_BASE_APPLICATION,
        final WindowState exitingAppWindow = createWindow(null, TYPE_BASE_APPLICATION,
                mDisplayContent, "exiting app");
                mDisplayContent, "exiting app");
        final AppWindowToken exitingAppToken = exitingAppWindow.mAppToken;
        final AppWindowToken exitingAppToken = exitingAppWindow.mAppToken;
        // Wait until everything in animation handler get executed to prevent the exiting window
        // from being removed during WindowSurfacePlacer Traversal.
        waitUntilHandlersIdle();

        exitingAppToken.mIsExiting = true;
        exitingAppToken.mIsExiting = true;
        exitingAppToken.getTask().mStack.mExitingAppTokens.add(exitingAppToken);
        exitingAppToken.getTask().mStack.mExitingAppTokens.add(exitingAppToken);