mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Add back waitForStateTransitionToEnd to fix flakiness.
Bug: 202735477 Test: presubmit Change-Id: I03c7e8b0c40177f4e6e38a7d9aa3e01b029effd6
This commit is contained in:
@@ -352,6 +352,14 @@ public abstract class AbstractLauncherUiTest {
|
||||
launcher -> launcher.getStateManager().getCurrentStableState() == state.get());
|
||||
}
|
||||
|
||||
// Cannot be used in TaplTests between a Tapl call injecting a gesture and a tapl call
|
||||
// expecting the results of that gesture because the wait can hide flakeness.
|
||||
protected void waitForStateTransitionToEnd(String message, Supplier<LauncherState> state) {
|
||||
waitForLauncherCondition(message,
|
||||
launcher -> launcher.getStateManager().isInStableState(state.get())
|
||||
&& !launcher.getStateManager().isInTransition());
|
||||
}
|
||||
|
||||
protected void waitForResumed(String message) {
|
||||
waitForLauncherCondition(message, launcher -> launcher.hasBeenResumed());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user