From 97cba26a20f80b78cbb19eec7a19f91399c4d92c Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Fri, 16 Jul 2021 18:26:54 +0100 Subject: [PATCH] Wait for dismiss animation to finish before checking task count - See http://b/193440212#comment5, TaskView takes time after swipe gesture to finish dismiss animation, so wait for the animation to finish before checking task count Bug: 193440212 Test: TaplTestsQuickstep#testOverview Change-Id: I21397e68f384e956a7c9f2ee8a8161ac784b4d2e --- .../src/com/android/quickstep/views/RecentsView.java | 1 + .../launcher3/compat/AccessibilityManagerCompat.java | 9 ++++++++- src/com/android/launcher3/testing/TestProtocol.java | 2 +- .../tapl/com/android/launcher3/tapl/OverviewTask.java | 11 ++++++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 6844f9f785..9dd4cf0c1f 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -2599,6 +2599,7 @@ public abstract class RecentsView mLauncher.linearGesture(centerX, centerY, centerX, 0, 10, false, + LauncherInstrumentation.GestureScope.INSIDE), + event -> TestProtocol.DISMISS_ANIMATION_ENDS_MESSAGE.equals( + event.getClassName()), + () -> "Didn't receive a dismiss animation ends message: " + centerX + ", " + + centerY, + "swiping to dismiss"); } }