Merge "Add Widget CUJ parameter to jank monitoring" into sc-dev
diff --git a/core/java/com/android/internal/jank/InteractionJankMonitor.java b/core/java/com/android/internal/jank/InteractionJankMonitor.java
index 0441594..f029e6a 100644
--- a/core/java/com/android/internal/jank/InteractionJankMonitor.java
+++ b/core/java/com/android/internal/jank/InteractionJankMonitor.java
@@ -28,6 +28,7 @@
 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_APP_LAUNCH_FROM_WIDGET;
 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;
@@ -144,6 +145,7 @@
     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;
+    public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET = 27;
 
     private static final int NO_STATSD_LOGGING = -1;
 
@@ -179,6 +181,7 @@
             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,
+            UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_WIDGET,
     };
 
     private static volatile InteractionJankMonitor sInstance;
@@ -225,6 +228,7 @@
             CUJ_LOCKSCREEN_TRANSITION_TO_AOD,
             CUJ_LAUNCHER_OPEN_ALL_APPS,
             CUJ_LAUNCHER_ALL_APPS_SCROLL,
+            CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface CujType {
@@ -537,6 +541,8 @@
                 return "CUJ_LAUNCHER_OPEN_ALL_APPS";
             case CUJ_LAUNCHER_ALL_APPS_SCROLL:
                 return "CUJ_LAUNCHER_ALL_APPS_SCROLL";
+            case CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET:
+                return "LAUNCHER_APP_LAUNCH_FROM_WIDGET";
         }
         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 bec9220..d40b94c 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
@@ -40,6 +40,8 @@
             InteractionJankMonitor.CUJ_LAUNCHER_OPEN_ALL_APPS;
     public static final int CUJ_ALL_APPS_SCROLL =
             InteractionJankMonitor.CUJ_LAUNCHER_ALL_APPS_SCROLL;
+    public static final int CUJ_APP_LAUNCH_FROM_WIDGET =
+            InteractionJankMonitor.CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET;
 
     @IntDef({
             CUJ_APP_LAUNCH_FROM_RECENTS,
@@ -47,6 +49,7 @@
             CUJ_APP_CLOSE_TO_HOME,
             CUJ_APP_CLOSE_TO_PIP,
             CUJ_QUICK_SWITCH,
+            CUJ_APP_LAUNCH_FROM_WIDGET,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface CujType {