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

Commit 66c13d15 authored by Wilson Wu's avatar Wilson Wu Committed by Android (Google) Code Review
Browse files

Merge "Attempt to fix testShowImeCold flake"

parents 06735144 6941f122
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -245,7 +245,9 @@ public class ImePerfTest extends ImePerfTestBase
        }

        long measuredTimeNs = 0;
        while (state.keepRunning(measuredTimeNs)) {
        boolean shouldRetry = false;
        while (shouldRetry || state.keepRunning(measuredTimeNs)) {
            shouldRetry = false;
            killBaselineIme();
            try (ImeSession imeSession = new ImeSession(BaselineIme.getName(
                    getInstrumentation().getContext()))) {
@@ -268,6 +270,14 @@ public class ImePerfTest extends ImePerfTestBase
                });

                measuredTimeNs = waitForAnimationStart(latchStart, startTime);

                if (measuredTimeNs == ANIMATION_NOT_STARTED) {
                    // Animation didn't start within timeout,
                    // retry for more samples.
                    // TODO(b/264722663): Investigate the animation start failure reason.
                    shouldRetry = true;
                    Log.w(TAG, "Insets animation didn't start within timeout.");
                }
                mActivityRule.finishActivity();
            }
        }