From 286581ebf27403c1ca182d3b47ad7450f67e87f1 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Wed, 6 Dec 2023 18:15:52 -0800 Subject: [PATCH] Partially reverting waiting for animation when setting widget result It flakes, i.e. sometimes the animation is not detected. Bug: 313926097 Flag: N/A Test: presubmit Change-Id: I829e4124879c3a3abe78762a8d04fcd0494f5b1a --- .../launcher3/ui/widget/AddConfigWidgetTest.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java index 9fdd21aee4..a28b4ef460 100644 --- a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java +++ b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java @@ -100,7 +100,7 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest { // Verify that the widget id is valid and bound assertNotNull(mAppWidgetManager.getAppWidgetInfo(mWidgetId)); - setResultAndWaitForAnimation(acceptConfig); + setResult(acceptConfig); if (acceptConfig) { Wait.atMost("", new WidgetSearchCondition(), DEFAULT_ACTIVITY_TIMEOUT, mLauncher); assertNotNull(mAppWidgetManager.getAppWidgetInfo(mWidgetId)); @@ -117,16 +117,6 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest { success ? "clickOK" : "clickCancel")); } - private void setResultAndWaitForAnimation(boolean success) { - if (mLauncher.isLauncher3()) { - setResult(success); - } else { - mLauncher.executeAndWaitForWallpaperAnimation( - () -> setResult(success), - "setting widget coinfig result"); - } - } - /** * Condition for searching widget id */