Fix TaplTestsNexus#testSearchForApp
This cl is 1/2 part change We are currently getting StaleObjectException when running this test. We want to implment a synchoronized event beetween test and launcher, so we know that search result adapter is done updating and page will get no more updates of search results. Test: Presubmit Bug: 232008758 Flag: not needed Change-Id: I40cf9b83d231a2487220aabc8f8e8c3ca71f255c
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.PAUSE_DETECTED_MESSAGE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.Log;
|
||||
@@ -201,7 +203,8 @@ public class MotionPauseDetector {
|
||||
ActiveGestureLog.INSTANCE.addLog(logString);
|
||||
boolean isFirstDetectedPause = !mHasEverBeenPaused && mIsPaused;
|
||||
if (mIsPaused) {
|
||||
AccessibilityManagerCompat.sendPauseDetectedEventToTest(mContext);
|
||||
AccessibilityManagerCompat.sendTestProtocolEventToTest(mContext,
|
||||
PAUSE_DETECTED_MESSAGE);
|
||||
mHasEverBeenPaused = true;
|
||||
}
|
||||
if (mOnMotionPauseListener != null) {
|
||||
|
||||
@@ -47,6 +47,7 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_CLEAR_ALL;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_DISMISS_SWIPE_UP;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_SWIPE_DOWN;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.DISMISS_ANIMATION_ENDS_MESSAGE;
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.CANVAS_TRANSLATE;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
@@ -4035,7 +4036,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
|
||||
protected void onDismissAnimationEnds() {
|
||||
AccessibilityManagerCompat.sendDismissAnimationEndsEventToTest(getContext());
|
||||
AccessibilityManagerCompat.sendTestProtocolEventToTest(getContext(),
|
||||
DISMISS_ANIMATION_ENDS_MESSAGE);
|
||||
}
|
||||
|
||||
public PendingAnimation createAllTasksDismissAnimation(long duration) {
|
||||
|
||||
Reference in New Issue
Block a user