Merge "Ensure waitOnMainUntil runs on the main thread" into udc-qpr-dev

This commit is contained in:
Cosmin Băieș
2023-08-21 08:07:51 +00:00
committed by Android (Google) Code Review

View File

@@ -154,7 +154,7 @@ public final class ImeStressTestUtil {
* <p>The given {@code pred} will be called on the main thread.
*/
public static void waitOnMainUntil(String message, Callable<Boolean> 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. */