diff --git a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestUtil.java b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestUtil.java index c9b5c96c99200..12556bcf7ded0 100644 --- a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestUtil.java +++ b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestUtil.java @@ -154,7 +154,7 @@ public final class ImeStressTestUtil { *

The given {@code pred} will be called on the main thread. */ public static void waitOnMainUntil(String message, Callable pred) { - eventually(() -> assertWithMessage(message).that(pred.call()).isTrue(), TIMEOUT); + eventually(() -> assertWithMessage(message).that(callOnMainSync(pred)).isTrue(), TIMEOUT); } /** Waits until IME is shown, or throws on timeout. */