From b649e5d34c3e473bf63d3bed6384b1a108bfd19a 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: I5819894196839af962010b66178e45abad516f0f --- .../com/android/internal/jank/InteractionJankMonitor.java | 8 +++++++- .../shared/system/InteractionJankMonitorWrapper.java | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/java/com/android/internal/jank/InteractionJankMonitor.java b/core/java/com/android/internal/jank/InteractionJankMonitor.java index a05062b43d601..39b9e217fce70 100644 --- a/core/java/com/android/internal/jank/InteractionJankMonitor.java +++ b/core/java/com/android/internal/jank/InteractionJankMonitor.java @@ -27,6 +27,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_ICON; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_RECENTS; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_WIDGET; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_SWIPE_TO_RECENTS; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_ALL_APPS; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_QUICK_SWITCH; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNLOCK_ENTRANCE_ANIMATION; @@ -225,6 +226,7 @@ public class InteractionJankMonitor { public static final int CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION = 63; public static final int CUJ_LOCKSCREEN_OCCLUSION = 64; public static final int CUJ_RECENTS_SCROLLING = 65; + public static final int CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS = 66; private static final int NO_STATSD_LOGGING = -1; @@ -299,6 +301,7 @@ public class InteractionJankMonitor { UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNLOCK_ENTRANCE_ANIMATION, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_OCCLUSION, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__RECENTS_SCROLLING, + UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_SWIPE_TO_RECENTS, }; private static volatile InteractionJankMonitor sInstance; @@ -384,7 +387,8 @@ public class InteractionJankMonitor { CUJ_SHADE_CLEAR_ALL, CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION, CUJ_LOCKSCREEN_OCCLUSION, - CUJ_RECENTS_SCROLLING + CUJ_RECENTS_SCROLLING, + CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS }) @Retention(RetentionPolicy.SOURCE) public @interface CujType { @@ -899,6 +903,8 @@ public class InteractionJankMonitor { return "LOCKSCREEN_OCCLUSION"; case CUJ_RECENTS_SCROLLING: return "RECENTS_SCROLLING"; + case CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS: + return "LAUNCHER_APP_SWIPE_TO_RECENTS"; } return "UNKNOWN"; } diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java index 8a2509610310a..82d70116bbffb 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java @@ -53,6 +53,8 @@ public final class InteractionJankMonitorWrapper { InteractionJankMonitor.CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION; public static final int CUJ_RECENTS_SCROLLING = InteractionJankMonitor.CUJ_RECENTS_SCROLLING; + public static final int CUJ_APP_SWIPE_TO_RECENTS = + InteractionJankMonitor.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS; @IntDef({ CUJ_APP_LAUNCH_FROM_RECENTS, @@ -62,7 +64,8 @@ public final class InteractionJankMonitorWrapper { CUJ_QUICK_SWITCH, CUJ_APP_LAUNCH_FROM_WIDGET, CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION, - CUJ_RECENTS_SCROLLING + CUJ_RECENTS_SCROLLING, + CUJ_APP_SWIPE_TO_RECENTS }) @Retention(RetentionPolicy.SOURCE) public @interface CujType {