Slowing down dismiss gesture to reduce flakiness
Change-Id: I13a1d2053e841994df537896c4fe397f68fa4a65
This commit is contained in:
parent
cf50c1b01d
commit
ceedc95d4c
|
@ -24,6 +24,7 @@ import androidx.test.uiautomator.Until;
|
|||
* A recent task in the overview panel carousel.
|
||||
*/
|
||||
public final class OverviewTask {
|
||||
static final int FLING_SPEED = 3000;
|
||||
private final LauncherInstrumentation mLauncher;
|
||||
private final UiObject2 mTask;
|
||||
private final BaseOverview mOverview;
|
||||
|
@ -45,7 +46,7 @@ public final class OverviewTask {
|
|||
public void dismiss() {
|
||||
verifyActiveContainer();
|
||||
// Dismiss the task via flinging it up.
|
||||
mTask.fling(Direction.DOWN);
|
||||
mTask.fling(Direction.DOWN, (int) (FLING_SPEED * mLauncher.getDisplayDensity()));
|
||||
mLauncher.waitForIdle();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue