• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.internal.jank;
18 
19 import android.annotation.IntDef;
20 
21 import com.android.internal.annotations.VisibleForTesting;
22 import com.android.internal.util.FrameworkStatsLog;
23 
24 import java.lang.annotation.Retention;
25 import java.lang.annotation.RetentionPolicy;
26 import java.util.Arrays;
27 
28 /** @hide */
29 public class Cuj {
30     @VisibleForTesting
31     public static final int MAX_LENGTH_OF_CUJ_NAME = 82;
32 
33     // Every value must have a corresponding entry in CUJ_STATSD_INTERACTION_TYPE.
34     public static final int CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE = 0;
35     public static final int CUJ_NOTIFICATION_SHADE_SCROLL_FLING = 2;
36     public static final int CUJ_NOTIFICATION_SHADE_ROW_EXPAND = 3;
37     public static final int CUJ_NOTIFICATION_SHADE_ROW_SWIPE = 4;
38     public static final int CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE = 5;
39     public static final int CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE = 6;
40     public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS = 7;
41     public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON = 8;
42     public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME = 9;
43     public static final int CUJ_LAUNCHER_APP_CLOSE_TO_PIP = 10;
44     public static final int CUJ_LAUNCHER_QUICK_SWITCH = 11;
45     public static final int CUJ_NOTIFICATION_HEADS_UP_APPEAR = 12;
46     public static final int CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR = 13;
47     public static final int CUJ_NOTIFICATION_ADD = 14;
48     public static final int CUJ_NOTIFICATION_REMOVE = 15;
49     public static final int CUJ_NOTIFICATION_APP_START = 16;
50     public static final int CUJ_LOCKSCREEN_PASSWORD_APPEAR = 17;
51     public static final int CUJ_LOCKSCREEN_PATTERN_APPEAR = 18;
52     public static final int CUJ_LOCKSCREEN_PIN_APPEAR = 19;
53     public static final int CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR = 20;
54     public static final int CUJ_LOCKSCREEN_PATTERN_DISAPPEAR = 21;
55     public static final int CUJ_LOCKSCREEN_PIN_DISAPPEAR = 22;
56     public static final int CUJ_LOCKSCREEN_TRANSITION_FROM_AOD = 23;
57     public static final int CUJ_LOCKSCREEN_TRANSITION_TO_AOD = 24;
58     public static final int CUJ_LAUNCHER_OPEN_ALL_APPS = 25;
59     public static final int CUJ_LAUNCHER_ALL_APPS_SCROLL = 26;
60     public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET = 27;
61     public static final int CUJ_SETTINGS_PAGE_SCROLL = 28;
62     public static final int CUJ_LOCKSCREEN_UNLOCK_ANIMATION = 29;
63     public static final int CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON = 30;
64     public static final int CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER = 31;
65     public static final int CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE = 32;
66     public static final int CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON = 33;
67     public static final int CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP = 34;
68     public static final int CUJ_PIP_TRANSITION = 35;
69     public static final int CUJ_WALLPAPER_TRANSITION = 36;
70     public static final int CUJ_USER_SWITCH = 37;
71     public static final int CUJ_SPLASHSCREEN_AVD = 38;
72     public static final int CUJ_SPLASHSCREEN_EXIT_ANIM = 39;
73     public static final int CUJ_SCREEN_OFF = 40;
74     public static final int CUJ_SCREEN_OFF_SHOW_AOD = 41;
75     public static final int CUJ_ONE_HANDED_ENTER_TRANSITION = 42;
76     public static final int CUJ_ONE_HANDED_EXIT_TRANSITION = 43;
77     public static final int CUJ_UNFOLD_ANIM = 44;
78     public static final int CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS = 45;
79     public static final int CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS = 46;
80     public static final int CUJ_SUW_LOADING_TO_NEXT_FLOW = 47;
81     public static final int CUJ_SUW_LOADING_SCREEN_FOR_STATUS = 48;
82     public static final int CUJ_SPLIT_SCREEN_ENTER = 49;
83     public static final int CUJ_SPLIT_SCREEN_EXIT = 50;
84     public static final int CUJ_LOCKSCREEN_LAUNCH_CAMERA = 51; // reserved.
85     public static final int CUJ_SPLIT_SCREEN_RESIZE = 52;
86     public static final int CUJ_SETTINGS_SLIDER = 53;
87     public static final int CUJ_TAKE_SCREENSHOT = 54;
88     public static final int CUJ_VOLUME_CONTROL = 55;
89     public static final int CUJ_BIOMETRIC_PROMPT_TRANSITION = 56;
90     public static final int CUJ_SETTINGS_TOGGLE = 57;
91     public static final int CUJ_SHADE_DIALOG_OPEN = 58;
92     public static final int CUJ_USER_DIALOG_OPEN = 59;
93     public static final int CUJ_TASKBAR_EXPAND = 60;
94     public static final int CUJ_TASKBAR_COLLAPSE = 61;
95     public static final int CUJ_SHADE_CLEAR_ALL = 62;
96     public static final int CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION = 63;
97     public static final int CUJ_LOCKSCREEN_OCCLUSION = 64;
98     public static final int CUJ_RECENTS_SCROLLING = 65;
99     public static final int CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS = 66;
100     public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE = 67;
101     public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME = 68;
102     public static final int CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION = 70;
103     public static final int CUJ_LAUNCHER_OPEN_SEARCH_RESULT = 71;
104     // 72 - 77 are reserved for b/281564325.
105 
106     /**
107      * In some cases when we do not have any end-target, we play a simple slide-down animation.
108      * eg: Open an app from Overview/Task switcher such that there is no home-screen icon.
109      * eg: Exit the app using back gesture.
110      */
111     public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK = 78;
112     // 79 is reserved.
113     public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80;
114     public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81;
115 
116     public static final int CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER = 82;
117 
118     public static final int CUJ_LAUNCHER_UNFOLD_ANIM = 83;
119 
120     public static final int CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY = 84;
121     public static final int CUJ_PREDICTIVE_BACK_CROSS_TASK = 85;
122     public static final int CUJ_PREDICTIVE_BACK_HOME = 86;
123     // 87 is reserved - previously assigned to deprecated CUJ_LAUNCHER_SEARCH_QSB_OPEN.
124     public static final int CUJ_BACK_PANEL_ARROW = 88;
125     public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK = 89;
126     public static final int CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH = 90;
127     public static final int CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE = 91;
128     public static final int CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR = 92;
129     public static final int CUJ_LAUNCHER_SAVE_APP_PAIR = 93;
130     public static final int CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK = 95;
131     public static final int CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK = 96;
132     public static final int CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK = 97;
133     public static final int CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK = 98;
134     public static final int CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK = 99;
135     public static final int CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK = 100;
136     public static final int CUJ_LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK = 101;
137     public static final int CUJ_LAUNCHER_PRIVATE_SPACE_LOCK = 102;
138     public static final int CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK = 103;
139 
140     /**
141      * Track maximize window interaction in desktop mode.
142      *
143      * <p>Tracking starts onClick of the maximize window button or option {@link
144      * com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel#onClick}
145      * and finishes when the window animation is ended {@link
146      * com.android.wm.shell.windowdecor.ToggleResizeDesktopTaskTransitionHandler#startAnimation}
147      */
148     public static final int CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW = 104;
149 
150     /**
151      * Track fade-in animation when in SystemUI process fold
152      *
153      * <p>Tracking starts after the screen turns on and finish when the animation is over {@link
154      * com.android.systemui.unfold.FoldLightRevealOverlayAnimation#playFoldLightRevealOverlayAnimation} for the span
155      */
156     public static final int CUJ_FOLD_ANIM = 105;
157 
158     /**
159      * Track window re-sizing interaction in desktop mode.
160      */
161     public static final int CUJ_DESKTOP_MODE_RESIZE_WINDOW = 106;
162 
163     /**
164      * Track app handle drag and hold interaction.
165      *
166      * <p>Tracking starts when the app handle is dragged and
167      * finishes immediately after app handle release, before starting a new transition.
168      */
169     public static final int CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD = 107;
170 
171     /** Track exiting desktop mode interaction. */
172     public static final int CUJ_DESKTOP_MODE_EXIT_MODE = 108;
173 
174     /** Track minimize window interaction in desktop mode. */
175     public static final int CUJ_DESKTOP_MODE_MINIMIZE_WINDOW = 109;
176 
177     /** Track window drag interaction in desktop mode. */
178     public static final int CUJ_DESKTOP_MODE_DRAG_WINDOW = 110;
179 
180     /** Track launching a dialog from a status bar chip. */
181     public static final int CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP = 111;
182 
183     /**
184      * Track entering desktop mode interaction via app handle menu.
185      *
186      * <p>Tracking starts after windowing mode option in the app handle menu is clicked and
187      * finishes when the window animation to desktop ends.
188      */
189     public static final int CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU = 112;
190 
191     /** Track Launcher Keyboard Quick Switch View opening animation */
192     public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN = 113;
193 
194     /** Track Launcher Keyboard Quick Switch View closing animation */
195     public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE = 114;
196 
197     /** Track launching an app through the Launcher Keyboard Quick Switch View */
198     public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH = 115;
199 
200     /**
201      * Track entering desktop mode interaction via app handle drag release.
202      *
203      * <p>Tracking starts when the app handle is released and
204      * finishes when one of the three possible animations end:
205      * <ul>
206      *     <li>release to desktop</li>
207      *     <li>release to split-screen</li>
208      *     <li>release to back to full-screen</li>
209      * </ul>.
210      */
211     public static final int CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE = 116;
212 
213     /**
214      * Track interaction of exiting desktop mode on closing the last window.
215      *
216      * <p>Tracking starts when the last window is closed and finishes when the animation to exit
217      * desktop mode ends.
218      */
219     public static final int CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE = 117;
220 
221     /**
222      * Track attempting to snap resize a desktop window via button or drag.
223      *
224      * <p>CUJ has 3 different tags:
225      * <ul>
226      *     <li>snap resizing resizable apps via maximize menu button: maximize_menu_resizable </li>
227      *     <li>snap resizing resizable via drag: drag_resizable </li>
228      *     <li>snap resizing non-resizable via drag: drag_non_resizable </li>
229      * </ul>
230      *
231      * <p>For non-resizable apps, the desktop window won't actually be resized, instead will return
232      * to its pre-dragged position. Attempting to snap resize a non-resizable app via the
233      * maximize menu will just result in no change, and a toast explaining the app can't be resized.
234      *
235      */
236     public static final int CUJ_DESKTOP_MODE_SNAP_RESIZE = 118;
237 
238     /**
239      * Track unmaximize window interaction in desktop mode.
240      *
241      * <p> Tracking starts when the maximize button or option is clicked {@link
242      * com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel#onClick}
243      * and finishes when the animation finishes {@link
244      * com.android.wm.shell.windowdecor.ToggleResizeDesktopTaskTransitionHandler#startAnimation}
245      * </p>
246      */
247     public static final int CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW = 119;
248 
249     /**
250      * Track moving overview task to desktop interaction from overview menu.
251      *
252      * <p> Tracking starts when the overview task is moved to desktop via the overview menu.
253      * Tracking finishes when successfully made a call to `IDesktopMode.moveToDesktop`,
254      * without waiting for transition completion.
255      * </p>
256      * TODO(b/387471509): Update the CUJ to wait for transition completion.
257      */
258     public static final int CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU = 120;
259 
260     /** Track Launcher Overview Task Dismiss animation.
261      *
262      * <p>Tracking starts when the overview task is dismissed via
263      * {@link com.android.quickstep.views.RecentsView#dismissTask}. Tracking finishes when the
264      * animation to dismiss the overview task ends.
265      */
266     public static final int CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS = 121;
267 
268     /**
269      * Track closing task in Desktop Windowing.
270      *
271      * <p> Tracking begins when the CloseDesktopTaskTransitionHandler in Launcher starts
272      * animating the task closure. This is triggered when the close button in the app header is
273      * clicked on a desktop window. </p>
274      */
275     public static final int CUJ_DESKTOP_MODE_CLOSE_TASK = 122;
276 
277     /**
278      * Track opening app launch via Intent in Desktop Windowing mode.
279      *
280      * <p> Tracking starts when when the RemoteTransition in Launcher starts animating the task
281      * launch. This is triggered when the user launches the app via Intent (it can be an opening
282      * a deeplink or clicking notification in notification drawer). </p>
283      */
284     public static final int CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT = 123;
285 
286     /**
287      * Track opening app launch from app icon in Desktop Windowing mode.
288      *
289      * <p> Tracking starts when when the RemoteTransition in Launcher starts animating the task
290      * launch. The task can be started from Taskbar (pinned or recent apps) or All apps menu. </p>
291      */
292     public static final int CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON = 124;
293 
294     /**
295      * Track opening app launch from Alt-Tab keyboard switch in Desktop Windowing mode.
296      *
297      * <p> Tracking starts when when the RemoteTransition in Launcher starts animating the task
298      * launch. This is triggered when the user switches between apps using Alt-Tab to track task
299      * launching animation. </p>
300      */
301     public static final int CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH = 125;
302 
303     /** Track work utility view animation expanding when scrolling up app list. */
304     public static final int CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND = 126;
305 
306     /** Track work utility view animation shrinking when scrolling down app list. */
307     public static final int CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK = 127;
308 
309     /**
310      * Track task transitions
311      *
312      * <p>Tracking starts and ends with the animation.</p>
313      */
314     public static final int CUJ_DEFAULT_TASK_TO_TASK_ANIMATION = 128;
315 
316     /**
317      * Track moving a window to another display in Desktop Windowing mode.
318      *
319      * <p>Tracking starts when the DesktopModeMoveToDisplayTransitionHandler starts animating the
320      * task to move it to another display. This is triggered when the user presses a keyboard
321      * shortcut or clicks the menu in the overview. Tracking ends when the animation completes.</p>
322      */
323     public static final int CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY = 129;
324 
325     /**
326      * Track the animation of an ongoing call app back into its status bar chip (displaying the call
327      * icon and timer) when returning Home.
328      *
329      * <p>Tracking starts when the RemoteTransition registered to handle the transition from the app
330      * to Home is sent the onAnimationStart() signal and start the animation. Tracking ends when
331      * the animation is fully settled and the transition is complete.</p>
332      */
333     public static final int CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP = 130;
334 
335     // When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE.
336     @VisibleForTesting static final int LAST_CUJ = CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP;
337 
338     /** @hide */
339     @IntDef({
340             CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE,
341             CUJ_NOTIFICATION_SHADE_SCROLL_FLING,
342             CUJ_NOTIFICATION_SHADE_ROW_EXPAND,
343             CUJ_NOTIFICATION_SHADE_ROW_SWIPE,
344             CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE,
345             CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE,
346             CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS,
347             CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON,
348             CUJ_LAUNCHER_APP_CLOSE_TO_HOME,
349             CUJ_LAUNCHER_APP_CLOSE_TO_PIP,
350             CUJ_LAUNCHER_QUICK_SWITCH,
351             CUJ_NOTIFICATION_HEADS_UP_APPEAR,
352             CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR,
353             CUJ_NOTIFICATION_ADD,
354             CUJ_NOTIFICATION_REMOVE,
355             CUJ_NOTIFICATION_APP_START,
356             CUJ_LOCKSCREEN_PASSWORD_APPEAR,
357             CUJ_LOCKSCREEN_PATTERN_APPEAR,
358             CUJ_LOCKSCREEN_PIN_APPEAR,
359             CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR,
360             CUJ_LOCKSCREEN_PATTERN_DISAPPEAR,
361             CUJ_LOCKSCREEN_PIN_DISAPPEAR,
362             CUJ_LOCKSCREEN_TRANSITION_FROM_AOD,
363             CUJ_LOCKSCREEN_TRANSITION_TO_AOD,
364             CUJ_LAUNCHER_OPEN_ALL_APPS,
365             CUJ_LAUNCHER_ALL_APPS_SCROLL,
366             CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET,
367             CUJ_SETTINGS_PAGE_SCROLL,
368             CUJ_LOCKSCREEN_UNLOCK_ANIMATION,
369             CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON,
370             CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER,
371             CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE,
372             CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON,
373             CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP,
374             CUJ_PIP_TRANSITION,
375             CUJ_WALLPAPER_TRANSITION,
376             CUJ_USER_SWITCH,
377             CUJ_SPLASHSCREEN_AVD,
378             CUJ_SPLASHSCREEN_EXIT_ANIM,
379             CUJ_SCREEN_OFF,
380             CUJ_SCREEN_OFF_SHOW_AOD,
381             CUJ_ONE_HANDED_ENTER_TRANSITION,
382             CUJ_ONE_HANDED_EXIT_TRANSITION,
383             CUJ_UNFOLD_ANIM,
384             CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS,
385             CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS,
386             CUJ_SUW_LOADING_TO_NEXT_FLOW,
387             CUJ_SUW_LOADING_SCREEN_FOR_STATUS,
388             CUJ_SPLIT_SCREEN_ENTER,
389             CUJ_SPLIT_SCREEN_EXIT,
390             CUJ_LOCKSCREEN_LAUNCH_CAMERA,
391             CUJ_SPLIT_SCREEN_RESIZE,
392             CUJ_SETTINGS_SLIDER,
393             CUJ_TAKE_SCREENSHOT,
394             CUJ_VOLUME_CONTROL,
395             CUJ_BIOMETRIC_PROMPT_TRANSITION,
396             CUJ_SETTINGS_TOGGLE,
397             CUJ_SHADE_DIALOG_OPEN,
398             CUJ_USER_DIALOG_OPEN,
399             CUJ_TASKBAR_EXPAND,
400             CUJ_TASKBAR_COLLAPSE,
401             CUJ_SHADE_CLEAR_ALL,
402             CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION,
403             CUJ_LOCKSCREEN_OCCLUSION,
404             CUJ_RECENTS_SCROLLING,
405             CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS,
406             CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE,
407             CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME,
408             CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION,
409             CUJ_LAUNCHER_OPEN_SEARCH_RESULT,
410             CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK,
411             CUJ_IME_INSETS_SHOW_ANIMATION,
412             CUJ_IME_INSETS_HIDE_ANIMATION,
413             CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER,
414             CUJ_LAUNCHER_UNFOLD_ANIM,
415             CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY,
416             CUJ_PREDICTIVE_BACK_CROSS_TASK,
417             CUJ_PREDICTIVE_BACK_HOME,
418             CUJ_BACK_PANEL_ARROW,
419             CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK,
420             CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH,
421             CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE,
422             CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR,
423             CUJ_LAUNCHER_SAVE_APP_PAIR,
424             CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK,
425             CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK,
426             CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK,
427             CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK,
428             CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK,
429             CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK,
430             CUJ_LAUNCHER_PRIVATE_SPACE_LOCK,
431             CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK,
432             CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW,
433             CUJ_FOLD_ANIM,
434             CUJ_DESKTOP_MODE_RESIZE_WINDOW,
435             CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD,
436             CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU,
437             CUJ_DESKTOP_MODE_EXIT_MODE,
438             CUJ_DESKTOP_MODE_MINIMIZE_WINDOW,
439             CUJ_DESKTOP_MODE_DRAG_WINDOW,
440             CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP,
441             CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN,
442             CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE,
443             CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH,
444             CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE,
445             CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE,
446             CUJ_DESKTOP_MODE_SNAP_RESIZE,
447             CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW,
448             CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU,
449             CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS,
450             CUJ_DESKTOP_MODE_CLOSE_TASK,
451             CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT,
452             CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON,
453             CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH,
454             CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND,
455             CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK,
456             CUJ_DEFAULT_TASK_TO_TASK_ANIMATION,
457             CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY,
458             CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP
459     })
460     @Retention(RetentionPolicy.SOURCE)
461     public @interface CujType {}
462 
463     private static final int NO_STATSD_LOGGING = -1;
464 
465     // Used to convert CujType to InteractionType enum value for statsd logging.
466     // Use NO_STATSD_LOGGING in case the measurement for a given CUJ should not be logged to statsd.
467     private static final int[] CUJ_TO_STATSD_INTERACTION_TYPE = new int[LAST_CUJ + 1];
468     static {
Arrays.fill(CUJ_TO_STATSD_INTERACTION_TYPE, NO_STATSD_LOGGING)469         Arrays.fill(CUJ_TO_STATSD_INTERACTION_TYPE, NO_STATSD_LOGGING);
470 
471         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__NOTIFICATION_SHADE_SWIPE;
472         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_SCROLL_FLING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_SCROLL_FLING;
473         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_ROW_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_ROW_EXPAND;
474         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_ROW_SWIPE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_ROW_SWIPE;
475         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_QS_EXPAND_COLLAPSE;
476         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_QS_SCROLL_SWIPE;
477         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_RECENTS;
478         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_ICON;
479         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_HOME] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME;
480         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_PIP] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_PIP;
481         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_QUICK_SWITCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_QUICK_SWITCH;
482         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_HEADS_UP_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_APPEAR;
483         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_DISAPPEAR;
484         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_ADD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_ADD;
485         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_REMOVE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_REMOVE;
486         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_APP_START] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH;
487         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PASSWORD_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PASSWORD_APPEAR;
488         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PATTERN_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PATTERN_APPEAR;
489         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PIN_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PIN_APPEAR;
490         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PASSWORD_DISAPPEAR;
491         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PATTERN_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PATTERN_DISAPPEAR;
492         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PIN_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PIN_DISAPPEAR;
493         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_TRANSITION_FROM_AOD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_TRANSITION_FROM_AOD;
494         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_TRANSITION_TO_AOD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_TRANSITION_TO_AOD;
495         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OPEN_ALL_APPS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_ALL_APPS;
496         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_ALL_APPS_SCROLL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_ALL_APPS_SCROLL;
497         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_WIDGET;
498         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SETTINGS_PAGE_SCROLL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_PAGE_SCROLL;
499         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_UNLOCK_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_UNLOCK_ANIMATION;
500         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON;
501         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER;
502         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_QS_TILE;
503         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON;
504         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP;
505         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PIP_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PIP_TRANSITION;
506         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WALLPAPER_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WALLPAPER_TRANSITION;
507         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_USER_SWITCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__USER_SWITCH;
508         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLASHSCREEN_AVD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_AVD;
509         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLASHSCREEN_EXIT_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_EXIT_ANIM;
510         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SCREEN_OFF] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF;
511         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SCREEN_OFF_SHOW_AOD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF_SHOW_AOD;
512         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_ONE_HANDED_ENTER_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__ONE_HANDED_ENTER_TRANSITION;
513         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_ONE_HANDED_EXIT_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__ONE_HANDED_EXIT_TRANSITION;
514         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_UNFOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__UNFOLD_ANIM;
515         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS;
516         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS;
517         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SUW_LOADING_TO_NEXT_FLOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SUW_LOADING_TO_NEXT_FLOW;
518         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SUW_LOADING_SCREEN_FOR_STATUS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SUW_LOADING_SCREEN_FOR_STATUS;
519         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_ENTER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_ENTER;
520         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_EXIT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_EXIT;
521         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_LAUNCH_CAMERA] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_LAUNCH_CAMERA;
522         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_RESIZE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_RESIZE;
523         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SETTINGS_SLIDER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_SLIDER;
524         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_TAKE_SCREENSHOT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TAKE_SCREENSHOT;
525         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_VOLUME_CONTROL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__VOLUME_CONTROL;
526         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_BIOMETRIC_PROMPT_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__BIOMETRIC_PROMPT_TRANSITION;
527         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SETTINGS_TOGGLE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_TOGGLE;
528         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_DIALOG_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_DIALOG_OPEN;
529         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_USER_DIALOG_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__USER_DIALOG_OPEN;
530         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_TASKBAR_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TASKBAR_EXPAND;
531         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_TASKBAR_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TASKBAR_COLLAPSE;
532         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_CLEAR_ALL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_CLEAR_ALL;
533         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNLOCK_ENTRANCE_ANIMATION;
534         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_OCCLUSION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_OCCLUSION;
535         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_RECENTS_SCROLLING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__RECENTS_SCROLLING;
536         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_SWIPE_TO_RECENTS;
537         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_SWIPE;
538         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_TO_HOME;
539         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_CLOCK_MOVE_ANIMATION;
540         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OPEN_SEARCH_RESULT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_SEARCH_RESULT;
541         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK;
542         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION;
543         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION;
544         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER;
545         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_UNFOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNFOLD_ANIM;
546         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PREDICTIVE_BACK_CROSS_ACTIVITY;
547         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PREDICTIVE_BACK_CROSS_TASK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PREDICTIVE_BACK_CROSS_TASK;
548         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PREDICTIVE_BACK_HOME] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PREDICTIVE_BACK_HOME;
549         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_BACK_PANEL_ARROW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__BACK_PANEL_ARROW;
550         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_BACK;
551         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_SEARCH_QSB_WEB_SEARCH;
552         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE;
553         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR;
554         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_SAVE_APP_PAIR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_SAVE_APP_PAIR;
555         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_ALL_APPS_SEARCH_BACK;
556         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK;
557         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK;
558         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_PICKER_CLOSE_BACK;
559         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_PICKER_SEARCH_BACK;
560         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK;
561         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK;
562         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_PRIVATE_SPACE_LOCK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_PRIVATE_SPACE_LOCK;
563         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_PRIVATE_SPACE_UNLOCK;
564         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MAXIMIZE_WINDOW;
565         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_FOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__FOLD_ANIM;
566         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_RESIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_RESIZE_WINDOW;
567         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD;
568         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU;
569         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_EXIT_MODE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_EXIT_MODE;
570         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MINIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MINIMIZE_WINDOW;
571         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_DRAG_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_DRAG_WINDOW;
572         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP;
573         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN;
574         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE;
575         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH;
576         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE;
577         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE;
578         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_SNAP_RESIZE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_SNAP_RESIZE;
579         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_UNMAXIMIZE_WINDOW;
580         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU;
581         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OVERVIEW_TASK_DISMISS;
582         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_CLOSE_TASK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_CLOSE_TASK;
583         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_APP_LAUNCH_FROM_INTENT;
584         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_APP_LAUNCH_FROM_ICON;
585         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH;
586         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WORK_UTILITY_VIEW_EXPAND;
587         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WORK_UTILITY_VIEW_SHRINK;
588         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DEFAULT_TASK_TO_TASK_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DEFAULT_TASK_TO_TASK_ANIMATION;
589         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY;
590         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__STATUS_BAR_APP_RETURN_TO_CALL_CHIP;
591     }
592 
Cuj()593     private Cuj() {
594     }
595 
596     /**
597      * A helper method to translate CUJ type to CUJ name.
598      *
599      * @param cujType the cuj type defined in this file
600      * @return the name of the cuj type
601      */
getNameOfCuj(int cujType)602     public static String getNameOfCuj(int cujType) {
603         // Please note:
604         // 1. The length of the returned string shouldn't exceed MAX_LENGTH_OF_CUJ_NAME.
605         // 2. The returned string should be the same with the name defined in atoms.proto.
606         switch (cujType) {
607             case CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE:
608                 return "NOTIFICATION_SHADE_EXPAND_COLLAPSE";
609             case CUJ_NOTIFICATION_SHADE_SCROLL_FLING:
610                 return "NOTIFICATION_SHADE_SCROLL_FLING";
611             case CUJ_NOTIFICATION_SHADE_ROW_EXPAND:
612                 return "NOTIFICATION_SHADE_ROW_EXPAND";
613             case CUJ_NOTIFICATION_SHADE_ROW_SWIPE:
614                 return "NOTIFICATION_SHADE_ROW_SWIPE";
615             case CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE:
616                 return "NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE";
617             case CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE:
618                 return "NOTIFICATION_SHADE_QS_SCROLL_SWIPE";
619             case CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS:
620                 return "LAUNCHER_APP_LAUNCH_FROM_RECENTS";
621             case CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON:
622                 return "LAUNCHER_APP_LAUNCH_FROM_ICON";
623             case CUJ_LAUNCHER_APP_CLOSE_TO_HOME:
624                 return "LAUNCHER_APP_CLOSE_TO_HOME";
625             case CUJ_LAUNCHER_APP_CLOSE_TO_PIP:
626                 return "LAUNCHER_APP_CLOSE_TO_PIP";
627             case CUJ_LAUNCHER_QUICK_SWITCH:
628                 return "LAUNCHER_QUICK_SWITCH";
629             case CUJ_NOTIFICATION_HEADS_UP_APPEAR:
630                 return "NOTIFICATION_HEADS_UP_APPEAR";
631             case CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR:
632                 return "NOTIFICATION_HEADS_UP_DISAPPEAR";
633             case CUJ_NOTIFICATION_ADD:
634                 return "NOTIFICATION_ADD";
635             case CUJ_NOTIFICATION_REMOVE:
636                 return "NOTIFICATION_REMOVE";
637             case CUJ_NOTIFICATION_APP_START:
638                 return "NOTIFICATION_APP_START";
639             case CUJ_LOCKSCREEN_PASSWORD_APPEAR:
640                 return "LOCKSCREEN_PASSWORD_APPEAR";
641             case CUJ_LOCKSCREEN_PATTERN_APPEAR:
642                 return "LOCKSCREEN_PATTERN_APPEAR";
643             case CUJ_LOCKSCREEN_PIN_APPEAR:
644                 return "LOCKSCREEN_PIN_APPEAR";
645             case CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR:
646                 return "LOCKSCREEN_PASSWORD_DISAPPEAR";
647             case CUJ_LOCKSCREEN_PATTERN_DISAPPEAR:
648                 return "LOCKSCREEN_PATTERN_DISAPPEAR";
649             case CUJ_LOCKSCREEN_PIN_DISAPPEAR:
650                 return "LOCKSCREEN_PIN_DISAPPEAR";
651             case CUJ_LOCKSCREEN_TRANSITION_FROM_AOD:
652                 return "LOCKSCREEN_TRANSITION_FROM_AOD";
653             case CUJ_LOCKSCREEN_TRANSITION_TO_AOD:
654                 return "LOCKSCREEN_TRANSITION_TO_AOD";
655             case CUJ_LAUNCHER_OPEN_ALL_APPS :
656                 return "LAUNCHER_OPEN_ALL_APPS";
657             case CUJ_LAUNCHER_ALL_APPS_SCROLL:
658                 return "LAUNCHER_ALL_APPS_SCROLL";
659             case CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET:
660                 return "LAUNCHER_APP_LAUNCH_FROM_WIDGET";
661             case CUJ_SETTINGS_PAGE_SCROLL:
662                 return "SETTINGS_PAGE_SCROLL";
663             case CUJ_LOCKSCREEN_UNLOCK_ANIMATION:
664                 return "LOCKSCREEN_UNLOCK_ANIMATION";
665             case CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON:
666                 return "SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON";
667             case CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER:
668                 return "SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER";
669             case CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE:
670                 return "SHADE_APP_LAUNCH_FROM_QS_TILE";
671             case CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON:
672                 return "SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON";
673             case CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP:
674                 return "STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP";
675             case CUJ_PIP_TRANSITION:
676                 return "PIP_TRANSITION";
677             case CUJ_WALLPAPER_TRANSITION:
678                 return "WALLPAPER_TRANSITION";
679             case CUJ_USER_SWITCH:
680                 return "USER_SWITCH";
681             case CUJ_SPLASHSCREEN_AVD:
682                 return "SPLASHSCREEN_AVD";
683             case CUJ_SPLASHSCREEN_EXIT_ANIM:
684                 return "SPLASHSCREEN_EXIT_ANIM";
685             case CUJ_SCREEN_OFF:
686                 return "SCREEN_OFF";
687             case CUJ_SCREEN_OFF_SHOW_AOD:
688                 return "SCREEN_OFF_SHOW_AOD";
689             case CUJ_ONE_HANDED_ENTER_TRANSITION:
690                 return "ONE_HANDED_ENTER_TRANSITION";
691             case CUJ_ONE_HANDED_EXIT_TRANSITION:
692                 return "ONE_HANDED_EXIT_TRANSITION";
693             case CUJ_UNFOLD_ANIM:
694                 return "UNFOLD_ANIM";
695             case CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS:
696                 return "SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS";
697             case CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS:
698                 return "SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS";
699             case CUJ_SUW_LOADING_TO_NEXT_FLOW:
700                 return "SUW_LOADING_TO_NEXT_FLOW";
701             case CUJ_SUW_LOADING_SCREEN_FOR_STATUS:
702                 return "SUW_LOADING_SCREEN_FOR_STATUS";
703             case CUJ_SPLIT_SCREEN_ENTER:
704                 return "SPLIT_SCREEN_ENTER";
705             case CUJ_SPLIT_SCREEN_EXIT:
706                 return "SPLIT_SCREEN_EXIT";
707             case CUJ_LOCKSCREEN_LAUNCH_CAMERA:
708                 return "LOCKSCREEN_LAUNCH_CAMERA";
709             case CUJ_SPLIT_SCREEN_RESIZE:
710                 return "SPLIT_SCREEN_RESIZE";
711             case CUJ_SETTINGS_SLIDER:
712                 return "SETTINGS_SLIDER";
713             case CUJ_TAKE_SCREENSHOT:
714                 return "TAKE_SCREENSHOT";
715             case CUJ_VOLUME_CONTROL:
716                 return "VOLUME_CONTROL";
717             case CUJ_BIOMETRIC_PROMPT_TRANSITION:
718                 return "BIOMETRIC_PROMPT_TRANSITION";
719             case CUJ_SETTINGS_TOGGLE:
720                 return "SETTINGS_TOGGLE";
721             case CUJ_SHADE_DIALOG_OPEN:
722                 return "SHADE_DIALOG_OPEN";
723             case CUJ_USER_DIALOG_OPEN:
724                 return "USER_DIALOG_OPEN";
725             case CUJ_TASKBAR_EXPAND:
726                 return "TASKBAR_EXPAND";
727             case CUJ_TASKBAR_COLLAPSE:
728                 return "TASKBAR_COLLAPSE";
729             case CUJ_SHADE_CLEAR_ALL:
730                 return "SHADE_CLEAR_ALL";
731             case CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION:
732                 return "LAUNCHER_UNLOCK_ENTRANCE_ANIMATION";
733             case CUJ_LOCKSCREEN_OCCLUSION:
734                 return "LOCKSCREEN_OCCLUSION";
735             case CUJ_RECENTS_SCROLLING:
736                 return "RECENTS_SCROLLING";
737             case CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS:
738                 return "LAUNCHER_APP_SWIPE_TO_RECENTS";
739             case CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE:
740                 return "LAUNCHER_CLOSE_ALL_APPS_SWIPE";
741             case CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME:
742                 return "LAUNCHER_CLOSE_ALL_APPS_TO_HOME";
743             case CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION:
744                 return "LOCKSCREEN_CLOCK_MOVE_ANIMATION";
745             case CUJ_LAUNCHER_OPEN_SEARCH_RESULT:
746                 return "LAUNCHER_OPEN_SEARCH_RESULT";
747             case CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK:
748                 return "LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK";
749             case CUJ_IME_INSETS_SHOW_ANIMATION:
750                 return "IME_INSETS_SHOW_ANIMATION";
751             case CUJ_IME_INSETS_HIDE_ANIMATION:
752                 return "IME_INSETS_HIDE_ANIMATION";
753             case CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER:
754                 return "SPLIT_SCREEN_DOUBLE_TAP_DIVIDER";
755             case CUJ_LAUNCHER_UNFOLD_ANIM:
756                 return "LAUNCHER_UNFOLD_ANIM";
757             case CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY:
758                 return "PREDICTIVE_BACK_CROSS_ACTIVITY";
759             case CUJ_PREDICTIVE_BACK_CROSS_TASK:
760                 return "PREDICTIVE_BACK_CROSS_TASK";
761             case CUJ_PREDICTIVE_BACK_HOME:
762                 return "PREDICTIVE_BACK_HOME";
763             case CUJ_BACK_PANEL_ARROW:
764                 return "BACK_PANEL_ARROW";
765             case CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK:
766                 return "LAUNCHER_CLOSE_ALL_APPS_BACK";
767             case CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH:
768                 return "LAUNCHER_SEARCH_QSB_WEB_SEARCH";
769             case CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE:
770                 return "LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE";
771             case CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR:
772                 return "LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR";
773             case CUJ_LAUNCHER_SAVE_APP_PAIR:
774                 return "LAUNCHER_SAVE_APP_PAIR";
775             case CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK:
776                 return "LAUNCHER_ALL_APPS_SEARCH_BACK";
777             case CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK:
778                 return "LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK";
779             case CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK:
780                 return "LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK";
781             case CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK:
782                 return "LAUNCHER_WIDGET_PICKER_CLOSE_BACK";
783             case CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK:
784                 return "LAUNCHER_WIDGET_PICKER_SEARCH_BACK";
785             case CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK:
786                 return "LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK";
787             case CUJ_LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK:
788                 return "LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK";
789             case CUJ_LAUNCHER_PRIVATE_SPACE_LOCK:
790                 return "LAUNCHER_PRIVATE_SPACE_LOCK";
791             case CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK:
792                 return "LAUNCHER_PRIVATE_SPACE_UNLOCK";
793             case CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW:
794                 return "DESKTOP_MODE_MAXIMIZE_WINDOW";
795             case CUJ_FOLD_ANIM:
796                 return "FOLD_ANIM";
797             case CUJ_DESKTOP_MODE_RESIZE_WINDOW:
798                 return "DESKTOP_MODE_RESIZE_WINDOW";
799             case CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD:
800                 return "DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD";
801             case CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU:
802                 return "DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU";
803             case CUJ_DESKTOP_MODE_EXIT_MODE:
804                 return "DESKTOP_MODE_EXIT_MODE";
805             case CUJ_DESKTOP_MODE_MINIMIZE_WINDOW:
806                 return "DESKTOP_MODE_MINIMIZE_WINDOW";
807             case CUJ_DESKTOP_MODE_DRAG_WINDOW:
808                 return "DESKTOP_MODE_DRAG_WINDOW";
809             case CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP:
810                 return "STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP";
811             case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN:
812                 return "LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN";
813             case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE:
814                 return "LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE";
815             case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH:
816                 return "LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH";
817             case CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE:
818                 return "DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE";
819             case CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE:
820                 return "DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE";
821             case CUJ_DESKTOP_MODE_SNAP_RESIZE:
822                 return "DESKTOP_MODE_SNAP_RESIZE";
823             case CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW:
824                 return "DESKTOP_MODE_UNMAXIMIZE_WINDOW";
825             case CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU:
826                 return "DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU";
827             case CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS:
828                 return "LAUNCHER_OVERVIEW_TASK_DISMISS";
829             case CUJ_DESKTOP_MODE_CLOSE_TASK:
830                 return "DESKTOP_MODE_CLOSE_TASK";
831             case CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT:
832                 return "DESKTOP_MODE_APP_LAUNCH_FROM_INTENT";
833             case CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON:
834                 return "DESKTOP_MODE_APP_LAUNCH_FROM_ICON";
835             case CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH:
836                 return "DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH";
837             case CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND:
838                 return "LAUNCHER_WORK_UTILITY_VIEW_EXPAND";
839             case CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK:
840                 return "LAUNCHER_WORK_UTILITY_VIEW_SHRINK";
841             case CUJ_DEFAULT_TASK_TO_TASK_ANIMATION:
842                 return "DEFAULT_TASK_TO_TASK_ANIMATION";
843             case CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY:
844                 return "DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY";
845             case CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP:
846                 return "STATUS_BAR_APP_RETURN_TO_CALL_CHIP";
847         }
848         return "UNKNOWN";
849     }
850 
getStatsdInteractionType(@ujType int cujType)851     public static int getStatsdInteractionType(@CujType int cujType) {
852         return CUJ_TO_STATSD_INTERACTION_TYPE[cujType];
853     }
854 
855     /** Returns whether the measurements for the given CUJ should be written to statsd. */
logToStatsd(@ujType int cujType)856     public static boolean logToStatsd(@CujType int cujType) {
857         return getStatsdInteractionType(cujType) != NO_STATSD_LOGGING;
858     }
859 
860     /**
861      * A helper method to translate interaction type to CUJ name.
862      *
863      * @param interactionType the interaction type defined in AtomsProto.java
864      * @return the name of the interaction type
865      */
getNameOfInteraction(int interactionType)866     public static String getNameOfInteraction(int interactionType) {
867         // There is an offset amount of 1 between cujType and interactionType.
868         return Cuj.getNameOfCuj(getCujTypeFromInteraction(interactionType));
869     }
870 
871     /**
872      * A helper method to translate interaction type to CUJ type.
873      *
874      * @param interactionType the interaction type defined in AtomsProto.java
875      * @return the integer in {@link Cuj.CujType}
876      */
getCujTypeFromInteraction(int interactionType)877     private static int getCujTypeFromInteraction(int interactionType) {
878         return interactionType - 1;
879     }
880 }
881