From 2351f764da8867535cdd20513959a06cd12875a1 Mon Sep 17 00:00:00 2001 From: vadimt Date: Wed, 3 Feb 2021 18:44:32 -0800 Subject: [PATCH] Adding All Apps CUJs to InteractionJankMonitor Test: presubmit Bug: 178656784, 178656812 Change-Id: I7b87d81a12d372bb20fb95c173eec67f34986cfe --- .../internal/jank/InteractionJankMonitor.java | 12 ++++++++++++ .../shared/system/InteractionJankMonitorWrapper.java | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/core/java/com/android/internal/jank/InteractionJankMonitor.java b/core/java/com/android/internal/jank/InteractionJankMonitor.java index e0f95544d5882..86c015fdbdac4 100644 --- a/core/java/com/android/internal/jank/InteractionJankMonitor.java +++ b/core/java/com/android/internal/jank/InteractionJankMonitor.java @@ -18,10 +18,12 @@ package com.android.internal.jank; import static com.android.internal.jank.FrameTracker.ChoreographerWrapper; import static com.android.internal.jank.FrameTracker.SurfaceControlWrapper; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_ALL_APPS_SCROLL; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_PIP; 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_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__LOCKSCREEN_PASSWORD_APPEAR; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PASSWORD_DISAPPEAR; @@ -113,6 +115,8 @@ public class InteractionJankMonitor { public static final int CUJ_LOCKSCREEN_PIN_DISAPPEAR = 22; public static final int CUJ_LOCKSCREEN_TRANSITION_FROM_AOD = 23; public static final int CUJ_LOCKSCREEN_TRANSITION_TO_AOD = 24; + public static final int CUJ_LAUNCHER_OPEN_ALL_APPS = 25; + public static final int CUJ_LAUNCHER_ALL_APPS_SCROLL = 26; private static final int NO_STATSD_LOGGING = -1; @@ -146,6 +150,8 @@ public class InteractionJankMonitor { UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PIN_DISAPPEAR, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_TRANSITION_FROM_AOD, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_TRANSITION_TO_AOD, + UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_ALL_APPS, + UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_ALL_APPS_SCROLL, }; private static volatile InteractionJankMonitor sInstance; @@ -190,6 +196,8 @@ public class InteractionJankMonitor { CUJ_LOCKSCREEN_PIN_DISAPPEAR, CUJ_LOCKSCREEN_TRANSITION_FROM_AOD, CUJ_LOCKSCREEN_TRANSITION_TO_AOD, + CUJ_LAUNCHER_OPEN_ALL_APPS, + CUJ_LAUNCHER_ALL_APPS_SCROLL, }) @Retention(RetentionPolicy.SOURCE) public @interface CujType { @@ -456,6 +464,10 @@ public class InteractionJankMonitor { return "CUJ_LOCKSCREEN_TRANSITION_FROM_AOD"; case CUJ_LOCKSCREEN_TRANSITION_TO_AOD: return "CUJ_LOCKSCREEN_TRANSITION_TO_AOD"; + case CUJ_LAUNCHER_OPEN_ALL_APPS : + return "CUJ_LAUNCHER_OPEN_ALL_APPS"; + case CUJ_LAUNCHER_ALL_APPS_SCROLL: + return "CUJ_LAUNCHER_ALL_APPS_SCROLL"; } 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 19e7d7ea4e6ef..bec9220028b15 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 @@ -17,7 +17,6 @@ package com.android.systemui.shared.system; import android.annotation.IntDef; -import android.annotation.NonNull; import android.view.View; import com.android.internal.jank.InteractionJankMonitor; @@ -37,6 +36,10 @@ public final class InteractionJankMonitorWrapper { InteractionJankMonitor.CUJ_LAUNCHER_APP_CLOSE_TO_PIP; public static final int CUJ_QUICK_SWITCH = InteractionJankMonitor.CUJ_LAUNCHER_QUICK_SWITCH; + public static final int CUJ_OPEN_ALL_APPS = + InteractionJankMonitor.CUJ_LAUNCHER_OPEN_ALL_APPS; + public static final int CUJ_ALL_APPS_SCROLL = + InteractionJankMonitor.CUJ_LAUNCHER_ALL_APPS_SCROLL; @IntDef({ CUJ_APP_LAUNCH_FROM_RECENTS,