From 2370406efb94129fa4ba873d79903878400c8501 Mon Sep 17 00:00:00 2001 From: Nicolo' Mazzucato Date: Tue, 1 Nov 2022 14:40:37 +0000 Subject: [PATCH] Add CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS Bug: 231130484 Bug: 228969045 Test: recorded prefetto trace while going to recents Change-Id: If33daaa22f904c928f5d4a561a7ac1a03d82b7eb --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 6 ++++++ .../com/android/quickstep/RecentsAnimationController.java | 2 ++ 2 files changed, 8 insertions(+) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index ff7c668991..bd270f9a14 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -939,6 +939,8 @@ public abstract class AbsSwipeUpHandler, InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH, 2000 /* ms timeout */); InteractionJankMonitorWrapper.begin(mRecentsView, InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME); + InteractionJankMonitorWrapper.begin(mRecentsView, + InteractionJankMonitorWrapper.CUJ_APP_SWIPE_TO_RECENTS); rv.post(() -> rv.getViewTreeObserver().removeOnDrawListener(this)); } @@ -1044,6 +1046,10 @@ public abstract class AbsSwipeUpHandler, InteractionJankMonitorWrapper.cancel( InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME); } + if (endTarget != RECENTS) { + InteractionJankMonitorWrapper.cancel( + InteractionJankMonitorWrapper.CUJ_APP_SWIPE_TO_RECENTS); + } switch (endTarget) { case HOME: diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java index 81e3782142..6088a36fdc 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java @@ -165,6 +165,8 @@ public class RecentsAnimationController { mController.finish(toRecents, sendUserLeaveHint); InteractionJankMonitorWrapper.end(InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH); InteractionJankMonitorWrapper.end(InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME); + InteractionJankMonitorWrapper.end( + InteractionJankMonitorWrapper.CUJ_APP_SWIPE_TO_RECENTS); MAIN_EXECUTOR.execute(mPendingFinishCallbacks::executeAllAndDestroy); }); }