/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.internal.jank;

import android.annotation.IntDef;
import android.util.Log;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FrameworkStatsLog;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;

/** @hide */
public class Cuj {
    @VisibleForTesting
    private static final String TAG = "Cuj";

    public static final int MAX_LENGTH_OF_CUJ_NAME = 82;

    // Every value must have a corresponding entry in CUJ_STATSD_INTERACTION_TYPE.
    public static final int CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE = 0;
    public static final int CUJ_NOTIFICATION_SHADE_SCROLL_FLING = 2;
    public static final int CUJ_NOTIFICATION_SHADE_ROW_EXPAND = 3;
    public static final int CUJ_NOTIFICATION_SHADE_ROW_SWIPE = 4;
    public static final int CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE = 5;
    public static final int CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE = 6;
    public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS = 7;
    public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON = 8;
    public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME = 9;
    public static final int CUJ_LAUNCHER_APP_CLOSE_TO_PIP = 10;
    public static final int CUJ_LAUNCHER_QUICK_SWITCH = 11;
    public static final int CUJ_NOTIFICATION_HEADS_UP_APPEAR = 12;
    public static final int CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR = 13;
    public static final int CUJ_NOTIFICATION_ADD = 14;
    public static final int CUJ_NOTIFICATION_REMOVE = 15;
    public static final int CUJ_NOTIFICATION_APP_START = 16;
    public static final int CUJ_LOCKSCREEN_PASSWORD_APPEAR = 17;
    public static final int CUJ_LOCKSCREEN_PATTERN_APPEAR = 18;
    public static final int CUJ_LOCKSCREEN_PIN_APPEAR = 19;
    public static final int CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR = 20;
    public static final int CUJ_LOCKSCREEN_PATTERN_DISAPPEAR = 21;
    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;
    public static final int CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET = 27;
    public static final int CUJ_SETTINGS_PAGE_SCROLL = 28;
    public static final int CUJ_LOCKSCREEN_UNLOCK_ANIMATION = 29;
    public static final int CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON = 30;
    public static final int CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER = 31;
    public static final int CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE = 32;
    public static final int CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON = 33;
    public static final int CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP = 34;
    public static final int CUJ_PIP_TRANSITION = 35;
    public static final int CUJ_WALLPAPER_TRANSITION = 36;
    public static final int CUJ_USER_SWITCH = 37;
    public static final int CUJ_SPLASHSCREEN_AVD = 38;
    public static final int CUJ_SPLASHSCREEN_EXIT_ANIM = 39;
    public static final int CUJ_SCREEN_OFF = 40;
    public static final int CUJ_SCREEN_OFF_SHOW_AOD = 41;
    public static final int CUJ_ONE_HANDED_ENTER_TRANSITION = 42;
    public static final int CUJ_ONE_HANDED_EXIT_TRANSITION = 43;
    public static final int CUJ_UNFOLD_ANIM = 44;
    public static final int CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS = 45;
    public static final int CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS = 46;
    public static final int CUJ_SUW_LOADING_TO_NEXT_FLOW = 47;
    public static final int CUJ_SUW_LOADING_SCREEN_FOR_STATUS = 48;
    public static final int CUJ_SPLIT_SCREEN_ENTER = 49;
    public static final int CUJ_SPLIT_SCREEN_EXIT = 50;
    public static final int CUJ_LOCKSCREEN_LAUNCH_CAMERA = 51; // reserved.
    public static final int CUJ_SPLIT_SCREEN_RESIZE = 52;
    public static final int CUJ_SETTINGS_SLIDER = 53;
    public static final int CUJ_TAKE_SCREENSHOT = 54;
    public static final int CUJ_VOLUME_CONTROL = 55;
    public static final int CUJ_BIOMETRIC_PROMPT_TRANSITION = 56;
    public static final int CUJ_SETTINGS_TOGGLE = 57;
    public static final int CUJ_SHADE_DIALOG_OPEN = 58;
    public static final int CUJ_USER_DIALOG_OPEN = 59;
    public static final int CUJ_TASKBAR_EXPAND = 60;
    public static final int CUJ_TASKBAR_COLLAPSE = 61;
    public static final int CUJ_SHADE_CLEAR_ALL = 62;
    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;
    public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE = 67;
    public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME = 68;
    public static final int CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION = 70;
    public static final int CUJ_LAUNCHER_OPEN_SEARCH_RESULT = 71;
    // 72 - 77 are reserved for b/281564325.

    /**
     * In some cases when we do not have any end-target, we play a simple slide-down animation.
     * eg: Open an app from Overview/Task switcher such that there is no home-screen icon.
     * eg: Exit the app using back gesture.
     */
    public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK = 78;
    // 79 is reserved.
    public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80;
    public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81;

    public static final int CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER = 82;

    public static final int CUJ_LAUNCHER_UNFOLD_ANIM = 83;

    public static final int CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY = 84;
    public static final int CUJ_PREDICTIVE_BACK_CROSS_TASK = 85;
    public static final int CUJ_PREDICTIVE_BACK_HOME = 86;
    // 87 is reserved - previously assigned to deprecated CUJ_LAUNCHER_SEARCH_QSB_OPEN.
    public static final int CUJ_BACK_PANEL_ARROW = 88;
    public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK = 89;
    public static final int CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH = 90;
    public static final int CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE = 91;
    public static final int CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR = 92;
    public static final int CUJ_LAUNCHER_SAVE_APP_PAIR = 93;
    public static final int CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK = 95;
    public static final int CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK = 96;
    public static final int CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK = 97;
    public static final int CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK = 98;
    public static final int CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK = 99;
    public static final int CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK = 100;
    public static final int CUJ_LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK = 101;
    public static final int CUJ_LAUNCHER_PRIVATE_SPACE_LOCK = 102;
    public static final int CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK = 103;

    /**
     * Track maximize window interaction in desktop mode.
     *
     * <p>Tracking starts onClick of the maximize window button or option {@link
     * com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel#onClick}
     * and finishes when the window animation is ended {@link
     * com.android.wm.shell.windowdecor.ToggleResizeDesktopTaskTransitionHandler#startAnimation}
     */
    public static final int CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW = 104;

    /**
     * Track fade-in animation when in SystemUI process fold
     *
     * <p>Tracking starts after the screen turns on and finish when the animation is over {@link
     * com.android.systemui.unfold.FoldLightRevealOverlayAnimation#playFoldLightRevealOverlayAnimation} for the span
     */
    public static final int CUJ_FOLD_ANIM = 105;

    /**
     * Track window re-sizing interaction in desktop mode.
     */
    public static final int CUJ_DESKTOP_MODE_RESIZE_WINDOW = 106;

    /**
     * Track app handle drag and hold interaction.
     *
     * <p>Tracking starts when the app handle is dragged and
     * finishes immediately after app handle release, before starting a new transition.
     */
    public static final int CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD = 107;

    /** Track exiting desktop mode interaction. */
    public static final int CUJ_DESKTOP_MODE_EXIT_MODE = 108;

    /** Track minimize window interaction in desktop mode. */
    public static final int CUJ_DESKTOP_MODE_MINIMIZE_WINDOW = 109;

    /** Track window drag interaction in desktop mode. */
    public static final int CUJ_DESKTOP_MODE_DRAG_WINDOW = 110;

    /** Track launching a dialog from a status bar chip. */
    public static final int CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP = 111;

    /**
     * Track entering desktop mode interaction via app handle menu.
     *
     * <p>Tracking starts after windowing mode option in the app handle menu is clicked and
     * finishes when the window animation to desktop ends.
     */
    public static final int CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU = 112;

    /** Track Launcher Keyboard Quick Switch View opening animation */
    public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN = 113;

    /** Track Launcher Keyboard Quick Switch View closing animation */
    public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE = 114;

    /** Track launching an app through the Launcher Keyboard Quick Switch View */
    public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH = 115;

    /**
     * Track entering desktop mode interaction via app handle drag release.
     *
     * <p>Tracking starts when the app handle is released and
     * finishes when one of the three possible animations end:
     * <ul>
     *     <li>release to desktop</li>
     *     <li>release to split-screen</li>
     *     <li>release to back to full-screen</li>
     * </ul>.
     */
    public static final int CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE = 116;

    /**
     * Track interaction of exiting desktop mode on closing the last window.
     *
     * <p>Tracking starts when the last window is closed and finishes when the animation to exit
     * desktop mode ends.
     */
    public static final int CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE = 117;

    /**
     * Track attempting to snap resize a desktop window via button or drag.
     *
     * <p>CUJ has 3 different tags:
     * <ul>
     *     <li>snap resizing resizable apps via maximize menu button: maximize_menu_resizable </li>
     *     <li>snap resizing resizable via drag: drag_resizable </li>
     *     <li>snap resizing non-resizable via drag: drag_non_resizable </li>
     * </ul>
     *
     * <p>For non-resizable apps, the desktop window won't actually be resized, instead will return
     * to its pre-dragged position. Attempting to snap resize a non-resizable app via the
     * maximize menu will just result in no change, and a toast explaining the app can't be resized.
     *
     */
    public static final int CUJ_DESKTOP_MODE_SNAP_RESIZE = 118;

    /**
     * Track unmaximize window interaction in desktop mode.
     *
     * <p> Tracking starts when the maximize button or option is clicked {@link
     * com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel#onClick}
     * and finishes when the animation finishes {@link
     * com.android.wm.shell.windowdecor.ToggleResizeDesktopTaskTransitionHandler#startAnimation}
     * </p>
     */
    public static final int CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW = 119;

    /**
     * Track moving overview task to desktop interaction from overview menu.
     *
     * <p> Tracking starts when the overview task is moved to desktop via the overview menu.
     * Tracking finishes when successfully made a call to `IDesktopMode.moveToDesktop`,
     * without waiting for transition completion.
     * </p>
     * TODO(b/387471509): Update the CUJ to wait for transition completion.
     */
    public static final int CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU = 120;

    /** Track Launcher Overview Task Dismiss animation.
     *
     * <p>Tracking starts when the overview task is dismissed via
     * {@link com.android.quickstep.views.RecentsView#dismissTask}. Tracking finishes when the
     * animation to dismiss the overview task ends.
     */
    public static final int CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS = 121;

    /**
     * Track closing task in Desktop Windowing.
     *
     * <p> Tracking begins when the CloseDesktopTaskTransitionHandler in Launcher starts
     * animating the task closure. This is triggered when the close button in the app header is
     * clicked on a desktop window. </p>
     */
    public static final int CUJ_DESKTOP_MODE_CLOSE_TASK = 122;

    /**
     * Track opening app launch via Intent in Desktop Windowing mode.
     *
     * <p> Tracking starts when when the RemoteTransition in Launcher starts animating the task
     * launch. This is triggered when the user launches the app via Intent (it can be an opening
     * a deeplink or clicking notification in notification drawer). </p>
     */
    public static final int CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT = 123;

    /**
     * Track opening app launch from app icon in Desktop Windowing mode.
     *
     * <p> Tracking starts when when the RemoteTransition in Launcher starts animating the task
     * launch. The task can be started from Taskbar (pinned or recent apps) or All apps menu. </p>
     */
    public static final int CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON = 124;

    /**
     * Track opening app launch from Alt-Tab keyboard switch in Desktop Windowing mode.
     *
     * <p> Tracking starts when when the RemoteTransition in Launcher starts animating the task
     * launch. This is triggered when the user switches between apps using Alt-Tab to track task
     * launching animation. </p>
     */
    public static final int CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH = 125;

    /** Track work utility view animation expanding when scrolling up app list. */
    public static final int CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND = 126;

    /** Track work utility view animation shrinking when scrolling down app list. */
    public static final int CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK = 127;

    /**
     * Track task transitions
     *
     * <p>Tracking starts and ends with the animation.</p>
     */
    public static final int CUJ_DEFAULT_TASK_TO_TASK_ANIMATION = 128;

    /**
     * Track moving a window to another display in Desktop Windowing mode.
     *
     * <p>Tracking starts when the DesktopModeMoveToDisplayTransitionHandler starts animating the
     * task to move it to another display. This is triggered when the user presses a keyboard
     * shortcut or clicks the menu in the overview. Tracking ends when the animation completes.</p>
     */
    public static final int CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY = 129;

    /**
     * Track the animation of an ongoing call app back into its status bar chip (displaying the call
     * icon and timer) when returning Home.
     *
     * <p>Tracking starts when the RemoteTransition registered to handle the transition from the app
     * to Home is sent the onAnimationStart() signal and start the animation. Tracking ends when
     * the animation is fully settled and the transition is complete.</p>
     */
    public static final int CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP = 130;

    /**
     * Track the animation of the smart action button or smart reply button of the notification.
     * The button in the notification features a gradient animation along their outlines when the
     * button is displayed.
     *
     * <p>Tracking starts when the button outline starts to animate.
     * Tracking ends when the button outline animation is fully settled.</p>
     */
    public static final int CUJ_NOTIFICATIONS_ANIMATED_ACTION = 131;

    /**
     * Track the animation of the assistant invocation by long pressing the power button.
     */
    public static final int CUJ_LPP_ASSIST_INVOCATION_EFFECT = 132;

    /**
     * Track wear tiles carousel jank.
     *
     * <p>The Tile Carousel is a UI module that hosts a watch face overlay and individual tile
     * surfaces, or an empty state placeholder tile if no tiles are configured to be shown. Swiping
     * horizontally from the watch face will cycle through all available tiles and eventually land
     * back on the watch face.
     *
     * <p>Tracking starts when the user scrolls the watch carousel. Tracking ends when the carousel
     * stops moving. This includes scrolling from watchface to a tile, and between tiles. A scroll
     * is any gesture that causes the carousel to move (regardless of speed and velocity).
     *
     * <p>A scroll event is always logged, alongside either a swipe or a fling event.
     */
    public static final int CUJ_WEAR_CAROUSEL_SCROLL_JANK = 133;

    /**
     * Track wear tiles carousel jank.
     *
     * <p>The Tile Carousel is a UI module that hosts a watch face overlay and individual tile
     * surfaces, or an empty state placeholder tile if no tiles are configured to be shown. Swiping
     * horizontally from the watch face will cycle through all available tiles and eventually land
     * back on the watch face.
     *
     * <p>Tracking starts when the user scrolls the watch carousel. Tracking ends when the carousel
     * stops moving. This includes scrolling from watchface to a tile, and between tiles.
     *
     * <p>A fling is any gesture that lasts less than a certain threshold
     * (http://google3/java/com/google/android/clockwork/sysui/mainui/module/carousel/HorizontalCarouselController.java;l=105;rcl=750121574).
     * A scroll event is always logged alongside this event.
     */
    public static final int CUJ_WEAR_CAROUSEL_FLING_JANK = 134;

    /**
     * Track wear tiles carousel jank.
     *
     * <p>The Tile Carousel is a UI module that hosts a watch face overlay and individual tile
     * surfaces, or an empty state placeholder tile if no tiles are configured to be shown. Swiping
     * horizontally from the watch face will cycle through all available tiles and eventually land
     * back on the watch face.
     *
     * <p>Tracking starts when the user scrolls the watch carousel. Tracking ends when the carousel
     * stops moving. This includes scrolling from watchface to a tile, and between tiles.
     *
     * <p>A swipe is any gesture that lasts more than a certain threshold
     * (http://google3/java/com/google/android/clockwork/sysui/mainui/module/carousel/HorizontalCarouselController.java;l=105;rcl=750121574).
     * A scroll event is always logged alongside this event.
     */
    public static final int CUJ_WEAR_CAROUSEL_SWIPE_JANK = 135;

    /**
     * Track wear QSS tray open jank.
     *
     * QSS tray is the quick settings tray on the watch that is accessed by a swipe down from the
     * top of the screen while looking at the watch face.
     *
     * <p>Tracking starts when the tray starts to become visible on screen. Tracking ends when the QSS tray
     * is fully expanded.
     */
    public static final int CUJ_WEAR_QSS_TRAY_OPEN = 136;

    /**
     * Track wear notification tray open jank.
     *
     * <p>Tracking starts when the notification tray starts to become visible on screen. Tracking
     * ends when the notification tray is fully expanded.
     */
    public static final int CUJ_WEAR_NOTIFICATION_TRAY_OPEN = 137;

    /**
     * Tracking when notification shade window gets moved between displays
     *
     * <p>Tracking starts when the notification shade starts to move to a new display, and ends
     * when the notification shade is fully expanded in the new display.
     */
    public static final int CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE = 138;

    /**
     * Track Launcher Overview Clear All animation.
     *
     * <p>Tracking starts when the clear all button in the overview is clicked.
     * Tracking finishes when the animations to dismiss all tasks ends.
     */
    public static final int CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL = 139;

    /**
     * Track when tile resizing divider is simultaneously resizing apps.
     *
     * <p> Tracking starts when the divider move handle is dragged and ends when the drag ends.
     */
    public static final int CUJ_DESKTOP_MODE_TILE_RESIZING = 140;

    /**
     * Tracks Launcher Widget Picker Open animation.
     *
     * <p>Tracking starts when the widget picker starts open animation.
     * Tracking finishes when the widget picker sheet is fully opened.
     */
    public static final int CUJ_LAUNCHER_WIDGET_PICKER_OPEN = 141;

    /**
     * Tracks expand animation for an app in the widget picker.
     *
     * <p>Tracking starts when user taps on an app in single pane widget picker.
     * Tracking finishes when the widget picker app is fully expanded.
     */
    public static final int CUJ_LAUNCHER_WIDGET_PICKER_APP_EXPAND = 142;

    /**
     * Tracks exiting from Desktop Windowing mode and moving into Split screen mode.
     *
     * <p>Tracking starts when user initiates exiting from Desktop Windowing (by tapping the
     * split-screen button in the app header menu) and finishes when transition to Split screen is
     * finished (animation ended, system is ready to choose another app to split).
     */
    public static final int CUJ_DESKTOP_MODE_MOVE_TO_SPLIT_SCREEN = 143;

    /**
     * Tracks exiting from Split screen mode and entering into Desktop Windowing mode.
     *
     * <p>Tracking begins when a user exits Split screen mode (by tapping the Desktop Windowing
     * button or using the drop event of drag-and-drop) and ends when the transition to Desktop
     * Windowing mode is complete (the animation has finished, and the mode is ready for user input)
     */
    public static final int CUJ_DESKTOP_MODE_MOVE_FROM_SPLIT_SCREEN = 144;

    /**
     * Tracks show animation for Cue bar. Cue bar is a floating bar that appears on the screen to
     * provide personalized contextual actions based on the current app. Please follow
     * go/cuebar-e2e-playbook to trigger Cue bar.
     *
     * <p>Tracking begins when the cue bar UI starts to show and ends when cue bar UI show
     * completely.
     */
    public static final int CUJ_AMBIENT_CUE_SHOW = 145;

    /**
     * Tracks hide animation for Cue bar. Cue bar is a floating bar that appears on the screen to
     * provide personalized contextual actions based on the current app. Please follow
     * go/cuebar-e2e-playbook to trigger Cue bar.
     *
     * <p>Tracking begins when the cue bar UI starts to hide (a user click the close button, switch
     * to another task, etc) and ends when cue bar UI disappears completely.
     */
    public static final int CUJ_AMBIENT_CUE_HIDE = 146;

    /**
     * Tracks expand animation for Cue bar. Cue bar is a floating bar that appears on the screen to
     * provide personalized contextual actions based on the current app. Please follow
     * go/cuebar-e2e-playbook to trigger Cue bar.
     *
     * <p>Tracking begins when a user click the cue bar to expand the action list and ends then all
     * actions show.
     */
    public static final int CUJ_AMBIENT_CUE_EXPAND = 147;

    /**
     * Tracks collapse animation for Cue bar. Cue bar is a floating bar that appears on the screen
     * to provide personalized contextual actions based on the current app. Please follow
     * go/cuebar-e2e-playbook to trigger Cue bar.
     *
     * <p>Tracking begins when the cue bar UI tap other region to collapse the action list and ends
     * when action list disappear completely.
     */
    public static final int CUJ_AMBIENT_CUE_COLLAPSE = 148;

    /**
     * Tracking transition from primary auth (PIN/pattern/password bouncer) to the biometric auth
     * bouncer during secure lock device two-factor authentication.
     */
    public static final int CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_APPEAR = 149;

    /**
     * Tracking bouncer dismissal following two-factor authentication completion in secure
     * lock device.
     */
    public static final int CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR = 150;

    // When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE.
    @VisibleForTesting static final int LAST_CUJ =
            CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR;

    /** @hide */
    @IntDef({
            CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE,
            CUJ_NOTIFICATION_SHADE_SCROLL_FLING,
            CUJ_NOTIFICATION_SHADE_ROW_EXPAND,
            CUJ_NOTIFICATION_SHADE_ROW_SWIPE,
            CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE,
            CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE,
            CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS,
            CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON,
            CUJ_LAUNCHER_APP_CLOSE_TO_HOME,
            CUJ_LAUNCHER_APP_CLOSE_TO_PIP,
            CUJ_LAUNCHER_QUICK_SWITCH,
            CUJ_NOTIFICATION_HEADS_UP_APPEAR,
            CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR,
            CUJ_NOTIFICATION_ADD,
            CUJ_NOTIFICATION_REMOVE,
            CUJ_NOTIFICATION_APP_START,
            CUJ_LOCKSCREEN_PASSWORD_APPEAR,
            CUJ_LOCKSCREEN_PATTERN_APPEAR,
            CUJ_LOCKSCREEN_PIN_APPEAR,
            CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR,
            CUJ_LOCKSCREEN_PATTERN_DISAPPEAR,
            CUJ_LOCKSCREEN_PIN_DISAPPEAR,
            CUJ_LOCKSCREEN_TRANSITION_FROM_AOD,
            CUJ_LOCKSCREEN_TRANSITION_TO_AOD,
            CUJ_LAUNCHER_OPEN_ALL_APPS,
            CUJ_LAUNCHER_ALL_APPS_SCROLL,
            CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET,
            CUJ_SETTINGS_PAGE_SCROLL,
            CUJ_LOCKSCREEN_UNLOCK_ANIMATION,
            CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON,
            CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER,
            CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE,
            CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON,
            CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP,
            CUJ_PIP_TRANSITION,
            CUJ_WALLPAPER_TRANSITION,
            CUJ_USER_SWITCH,
            CUJ_SPLASHSCREEN_AVD,
            CUJ_SPLASHSCREEN_EXIT_ANIM,
            CUJ_SCREEN_OFF,
            CUJ_SCREEN_OFF_SHOW_AOD,
            CUJ_ONE_HANDED_ENTER_TRANSITION,
            CUJ_ONE_HANDED_EXIT_TRANSITION,
            CUJ_UNFOLD_ANIM,
            CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS,
            CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS,
            CUJ_SUW_LOADING_TO_NEXT_FLOW,
            CUJ_SUW_LOADING_SCREEN_FOR_STATUS,
            CUJ_SPLIT_SCREEN_ENTER,
            CUJ_SPLIT_SCREEN_EXIT,
            CUJ_LOCKSCREEN_LAUNCH_CAMERA,
            CUJ_SPLIT_SCREEN_RESIZE,
            CUJ_SETTINGS_SLIDER,
            CUJ_TAKE_SCREENSHOT,
            CUJ_VOLUME_CONTROL,
            CUJ_BIOMETRIC_PROMPT_TRANSITION,
            CUJ_SETTINGS_TOGGLE,
            CUJ_SHADE_DIALOG_OPEN,
            CUJ_USER_DIALOG_OPEN,
            CUJ_TASKBAR_EXPAND,
            CUJ_TASKBAR_COLLAPSE,
            CUJ_SHADE_CLEAR_ALL,
            CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION,
            CUJ_LOCKSCREEN_OCCLUSION,
            CUJ_RECENTS_SCROLLING,
            CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS,
            CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE,
            CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME,
            CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION,
            CUJ_LAUNCHER_OPEN_SEARCH_RESULT,
            CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK,
            CUJ_IME_INSETS_SHOW_ANIMATION,
            CUJ_IME_INSETS_HIDE_ANIMATION,
            CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER,
            CUJ_LAUNCHER_UNFOLD_ANIM,
            CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY,
            CUJ_PREDICTIVE_BACK_CROSS_TASK,
            CUJ_PREDICTIVE_BACK_HOME,
            CUJ_BACK_PANEL_ARROW,
            CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK,
            CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH,
            CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE,
            CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR,
            CUJ_LAUNCHER_SAVE_APP_PAIR,
            CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK,
            CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK,
            CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK,
            CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK,
            CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK,
            CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK,
            CUJ_LAUNCHER_PRIVATE_SPACE_LOCK,
            CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK,
            CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW,
            CUJ_FOLD_ANIM,
            CUJ_DESKTOP_MODE_RESIZE_WINDOW,
            CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD,
            CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU,
            CUJ_DESKTOP_MODE_EXIT_MODE,
            CUJ_DESKTOP_MODE_MINIMIZE_WINDOW,
            CUJ_DESKTOP_MODE_DRAG_WINDOW,
            CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP,
            CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN,
            CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE,
            CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH,
            CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE,
            CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE,
            CUJ_DESKTOP_MODE_SNAP_RESIZE,
            CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW,
            CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU,
            CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS,
            CUJ_DESKTOP_MODE_CLOSE_TASK,
            CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT,
            CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON,
            CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH,
            CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND,
            CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK,
            CUJ_DEFAULT_TASK_TO_TASK_ANIMATION,
            CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY,
            CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP,
            CUJ_NOTIFICATIONS_ANIMATED_ACTION,
            CUJ_LPP_ASSIST_INVOCATION_EFFECT,
            CUJ_WEAR_CAROUSEL_SCROLL_JANK,
            CUJ_WEAR_CAROUSEL_FLING_JANK,
            CUJ_WEAR_CAROUSEL_SWIPE_JANK,
            CUJ_WEAR_QSS_TRAY_OPEN,
            CUJ_WEAR_NOTIFICATION_TRAY_OPEN,
            CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE,
            CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL,
            CUJ_DESKTOP_MODE_TILE_RESIZING,
            CUJ_LAUNCHER_WIDGET_PICKER_OPEN,
            CUJ_LAUNCHER_WIDGET_PICKER_APP_EXPAND,
            CUJ_DESKTOP_MODE_MOVE_TO_SPLIT_SCREEN,
            CUJ_DESKTOP_MODE_MOVE_FROM_SPLIT_SCREEN,
            CUJ_AMBIENT_CUE_SHOW,
            CUJ_AMBIENT_CUE_HIDE,
            CUJ_AMBIENT_CUE_EXPAND,
            CUJ_AMBIENT_CUE_COLLAPSE,
            CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_APPEAR,
            CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CujType {}

    private static final int NO_STATSD_LOGGING = -1;

    // Used to convert CujType to InteractionType enum value for statsd logging.
    // Use NO_STATSD_LOGGING in case the measurement for a given CUJ should not be logged to statsd.
    private static final int[] CUJ_TO_STATSD_INTERACTION_TYPE = new int[LAST_CUJ + 1];
    static {
        Arrays.fill(CUJ_TO_STATSD_INTERACTION_TYPE, NO_STATSD_LOGGING);

        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__NOTIFICATION_SHADE_SWIPE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_SCROLL_FLING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_SCROLL_FLING;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_ROW_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_ROW_EXPAND;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_ROW_SWIPE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_ROW_SWIPE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_QS_EXPAND_COLLAPSE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_QS_SCROLL_SWIPE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_RECENTS;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_ICON;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_HOME] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_PIP] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_PIP;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_QUICK_SWITCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_QUICK_SWITCH;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_HEADS_UP_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_APPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_DISAPPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_ADD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_ADD;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_REMOVE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_REMOVE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_APP_START] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PASSWORD_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PASSWORD_APPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PATTERN_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PATTERN_APPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PIN_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PIN_APPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PASSWORD_DISAPPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PATTERN_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PATTERN_DISAPPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_PIN_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_PIN_DISAPPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_TRANSITION_FROM_AOD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_TRANSITION_FROM_AOD;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_TRANSITION_TO_AOD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_TRANSITION_TO_AOD;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OPEN_ALL_APPS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_ALL_APPS;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_ALL_APPS_SCROLL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_ALL_APPS_SCROLL;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_LAUNCH_FROM_WIDGET;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SETTINGS_PAGE_SCROLL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_PAGE_SCROLL;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_UNLOCK_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_UNLOCK_ANIMATION;
        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;
        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;
        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;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PIP_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PIP_TRANSITION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WALLPAPER_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WALLPAPER_TRANSITION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_USER_SWITCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__USER_SWITCH;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLASHSCREEN_AVD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_AVD;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLASHSCREEN_EXIT_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_EXIT_ANIM;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SCREEN_OFF] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SCREEN_OFF_SHOW_AOD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF_SHOW_AOD;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_ONE_HANDED_ENTER_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__ONE_HANDED_ENTER_TRANSITION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_ONE_HANDED_EXIT_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__ONE_HANDED_EXIT_TRANSITION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_UNFOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__UNFOLD_ANIM;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SUW_LOADING_TO_NEXT_FLOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SUW_LOADING_TO_NEXT_FLOW;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SUW_LOADING_SCREEN_FOR_STATUS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SUW_LOADING_SCREEN_FOR_STATUS;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_ENTER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_ENTER;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_EXIT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_EXIT;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_LAUNCH_CAMERA] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_LAUNCH_CAMERA;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_RESIZE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_RESIZE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SETTINGS_SLIDER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_SLIDER;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_TAKE_SCREENSHOT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TAKE_SCREENSHOT;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_VOLUME_CONTROL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__VOLUME_CONTROL;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_BIOMETRIC_PROMPT_TRANSITION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__BIOMETRIC_PROMPT_TRANSITION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SETTINGS_TOGGLE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_TOGGLE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_DIALOG_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_DIALOG_OPEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_USER_DIALOG_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__USER_DIALOG_OPEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_TASKBAR_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TASKBAR_EXPAND;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_TASKBAR_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TASKBAR_COLLAPSE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_CLEAR_ALL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_CLEAR_ALL;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNLOCK_ENTRANCE_ANIMATION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_OCCLUSION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_OCCLUSION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_RECENTS_SCROLLING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__RECENTS_SCROLLING;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_SWIPE_TO_RECENTS;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_SWIPE;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_CLOCK_MOVE_ANIMATION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OPEN_SEARCH_RESULT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_SEARCH_RESULT;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_UNFOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNFOLD_ANIM;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PREDICTIVE_BACK_CROSS_ACTIVITY;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PREDICTIVE_BACK_CROSS_TASK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PREDICTIVE_BACK_CROSS_TASK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_PREDICTIVE_BACK_HOME] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__PREDICTIVE_BACK_HOME;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_BACK_PANEL_ARROW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__BACK_PANEL_ARROW;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_BACK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_SEARCH_QSB_WEB_SEARCH;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_SAVE_APP_PAIR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_SAVE_APP_PAIR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_ALL_APPS_SEARCH_BACK;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_PICKER_CLOSE_BACK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_PICKER_SEARCH_BACK;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_PRIVATE_SPACE_LOCK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_PRIVATE_SPACE_LOCK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_PRIVATE_SPACE_UNLOCK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MAXIMIZE_WINDOW;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_FOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__FOLD_ANIM;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_RESIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_RESIZE_WINDOW;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_EXIT_MODE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_EXIT_MODE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MINIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MINIMIZE_WINDOW;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_DRAG_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_DRAG_WINDOW;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE;
        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;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_SNAP_RESIZE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_SNAP_RESIZE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_UNMAXIMIZE_WINDOW;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OVERVIEW_TASK_DISMISS;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_CLOSE_TASK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_CLOSE_TASK;
        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;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WORK_UTILITY_VIEW_EXPAND;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WORK_UTILITY_VIEW_SHRINK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DEFAULT_TASK_TO_TASK_ANIMATION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DEFAULT_TASK_TO_TASK_ANIMATION;
        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;
        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;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATIONS_ANIMATED_ACTION] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__NOTIFICATIONS_ANIMATED_ACTION;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LPP_ASSIST_INVOCATION_EFFECT] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LPP_ASSIST_INVOCATION_EFFECT;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_CAROUSEL_SCROLL_JANK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_CAROUSEL_SCROLL_JANK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_CAROUSEL_FLING_JANK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_CAROUSEL_FLING_JANK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_CAROUSEL_SWIPE_JANK] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_CAROUSEL_SWIPE_JANK;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_QSS_TRAY_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_QSS_TRAY_OPEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_NOTIFICATION_TRAY_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_NOTIFICATION_TRAY_OPEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OVERVIEW_CLEAR_ALL;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_TILE_RESIZING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_TILE_RESIZING;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_PICKER_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_PICKER_OPEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_WIDGET_PICKER_APP_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_WIDGET_PICKER_APP_EXPAND;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MOVE_TO_SPLIT_SCREEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MOVE_TO_SPLIT_SCREEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MOVE_FROM_SPLIT_SCREEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MOVE_FROM_SPLIT_SCREEN;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_AMBIENT_CUE_SHOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__AMBIENT_CUE_SHOW;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_AMBIENT_CUE_HIDE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__AMBIENT_CUE_HIDE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_AMBIENT_CUE_EXPAND] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__AMBIENT_CUE_EXPAND;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_AMBIENT_CUE_COLLAPSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__AMBIENT_CUE_COLLAPSE;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_APPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_APPEAR;
        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR;
    }

    private Cuj() {
    }

    /**
     * A helper method to translate CUJ type to CUJ name.
     *
     * @param cujType the cuj type defined in this file
     * @return the name of the cuj type
     */
    public static String getNameOfCuj(int cujType) {
        // Please note:
        // 1. The length of the returned string shouldn't exceed MAX_LENGTH_OF_CUJ_NAME.
        // 2. The returned string should be the same with the name defined in atoms.proto.
        switch (cujType) {
            case CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE:
                return "NOTIFICATION_SHADE_EXPAND_COLLAPSE";
            case CUJ_NOTIFICATION_SHADE_SCROLL_FLING:
                return "NOTIFICATION_SHADE_SCROLL_FLING";
            case CUJ_NOTIFICATION_SHADE_ROW_EXPAND:
                return "NOTIFICATION_SHADE_ROW_EXPAND";
            case CUJ_NOTIFICATION_SHADE_ROW_SWIPE:
                return "NOTIFICATION_SHADE_ROW_SWIPE";
            case CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE:
                return "NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE";
            case CUJ_NOTIFICATION_SHADE_QS_SCROLL_SWIPE:
                return "NOTIFICATION_SHADE_QS_SCROLL_SWIPE";
            case CUJ_LAUNCHER_APP_LAUNCH_FROM_RECENTS:
                return "LAUNCHER_APP_LAUNCH_FROM_RECENTS";
            case CUJ_LAUNCHER_APP_LAUNCH_FROM_ICON:
                return "LAUNCHER_APP_LAUNCH_FROM_ICON";
            case CUJ_LAUNCHER_APP_CLOSE_TO_HOME:
                return "LAUNCHER_APP_CLOSE_TO_HOME";
            case CUJ_LAUNCHER_APP_CLOSE_TO_PIP:
                return "LAUNCHER_APP_CLOSE_TO_PIP";
            case CUJ_LAUNCHER_QUICK_SWITCH:
                return "LAUNCHER_QUICK_SWITCH";
            case CUJ_NOTIFICATION_HEADS_UP_APPEAR:
                return "NOTIFICATION_HEADS_UP_APPEAR";
            case CUJ_NOTIFICATION_HEADS_UP_DISAPPEAR:
                return "NOTIFICATION_HEADS_UP_DISAPPEAR";
            case CUJ_NOTIFICATION_ADD:
                return "NOTIFICATION_ADD";
            case CUJ_NOTIFICATION_REMOVE:
                return "NOTIFICATION_REMOVE";
            case CUJ_NOTIFICATION_APP_START:
                return "NOTIFICATION_APP_START";
            case CUJ_LOCKSCREEN_PASSWORD_APPEAR:
                return "LOCKSCREEN_PASSWORD_APPEAR";
            case CUJ_LOCKSCREEN_PATTERN_APPEAR:
                return "LOCKSCREEN_PATTERN_APPEAR";
            case CUJ_LOCKSCREEN_PIN_APPEAR:
                return "LOCKSCREEN_PIN_APPEAR";
            case CUJ_LOCKSCREEN_PASSWORD_DISAPPEAR:
                return "LOCKSCREEN_PASSWORD_DISAPPEAR";
            case CUJ_LOCKSCREEN_PATTERN_DISAPPEAR:
                return "LOCKSCREEN_PATTERN_DISAPPEAR";
            case CUJ_LOCKSCREEN_PIN_DISAPPEAR:
                return "LOCKSCREEN_PIN_DISAPPEAR";
            case CUJ_LOCKSCREEN_TRANSITION_FROM_AOD:
                return "LOCKSCREEN_TRANSITION_FROM_AOD";
            case CUJ_LOCKSCREEN_TRANSITION_TO_AOD:
                return "LOCKSCREEN_TRANSITION_TO_AOD";
            case CUJ_LAUNCHER_OPEN_ALL_APPS :
                return "LAUNCHER_OPEN_ALL_APPS";
            case CUJ_LAUNCHER_ALL_APPS_SCROLL:
                return "LAUNCHER_ALL_APPS_SCROLL";
            case CUJ_LAUNCHER_APP_LAUNCH_FROM_WIDGET:
                return "LAUNCHER_APP_LAUNCH_FROM_WIDGET";
            case CUJ_SETTINGS_PAGE_SCROLL:
                return "SETTINGS_PAGE_SCROLL";
            case CUJ_LOCKSCREEN_UNLOCK_ANIMATION:
                return "LOCKSCREEN_UNLOCK_ANIMATION";
            case CUJ_SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON:
                return "SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON";
            case CUJ_SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER:
                return "SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER";
            case CUJ_SHADE_APP_LAUNCH_FROM_QS_TILE:
                return "SHADE_APP_LAUNCH_FROM_QS_TILE";
            case CUJ_SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON:
                return "SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON";
            case CUJ_STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP:
                return "STATUS_BAR_APP_LAUNCH_FROM_CALL_CHIP";
            case CUJ_PIP_TRANSITION:
                return "PIP_TRANSITION";
            case CUJ_WALLPAPER_TRANSITION:
                return "WALLPAPER_TRANSITION";
            case CUJ_USER_SWITCH:
                return "USER_SWITCH";
            case CUJ_SPLASHSCREEN_AVD:
                return "SPLASHSCREEN_AVD";
            case CUJ_SPLASHSCREEN_EXIT_ANIM:
                return "SPLASHSCREEN_EXIT_ANIM";
            case CUJ_SCREEN_OFF:
                return "SCREEN_OFF";
            case CUJ_SCREEN_OFF_SHOW_AOD:
                return "SCREEN_OFF_SHOW_AOD";
            case CUJ_ONE_HANDED_ENTER_TRANSITION:
                return "ONE_HANDED_ENTER_TRANSITION";
            case CUJ_ONE_HANDED_EXIT_TRANSITION:
                return "ONE_HANDED_EXIT_TRANSITION";
            case CUJ_UNFOLD_ANIM:
                return "UNFOLD_ANIM";
            case CUJ_SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS:
                return "SUW_LOADING_TO_SHOW_INFO_WITH_ACTIONS";
            case CUJ_SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS:
                return "SUW_SHOW_FUNCTION_SCREEN_WITH_ACTIONS";
            case CUJ_SUW_LOADING_TO_NEXT_FLOW:
                return "SUW_LOADING_TO_NEXT_FLOW";
            case CUJ_SUW_LOADING_SCREEN_FOR_STATUS:
                return "SUW_LOADING_SCREEN_FOR_STATUS";
            case CUJ_SPLIT_SCREEN_ENTER:
                return "SPLIT_SCREEN_ENTER";
            case CUJ_SPLIT_SCREEN_EXIT:
                return "SPLIT_SCREEN_EXIT";
            case CUJ_LOCKSCREEN_LAUNCH_CAMERA:
                return "LOCKSCREEN_LAUNCH_CAMERA";
            case CUJ_SPLIT_SCREEN_RESIZE:
                return "SPLIT_SCREEN_RESIZE";
            case CUJ_SETTINGS_SLIDER:
                return "SETTINGS_SLIDER";
            case CUJ_TAKE_SCREENSHOT:
                return "TAKE_SCREENSHOT";
            case CUJ_VOLUME_CONTROL:
                return "VOLUME_CONTROL";
            case CUJ_BIOMETRIC_PROMPT_TRANSITION:
                return "BIOMETRIC_PROMPT_TRANSITION";
            case CUJ_SETTINGS_TOGGLE:
                return "SETTINGS_TOGGLE";
            case CUJ_SHADE_DIALOG_OPEN:
                return "SHADE_DIALOG_OPEN";
            case CUJ_USER_DIALOG_OPEN:
                return "USER_DIALOG_OPEN";
            case CUJ_TASKBAR_EXPAND:
                return "TASKBAR_EXPAND";
            case CUJ_TASKBAR_COLLAPSE:
                return "TASKBAR_COLLAPSE";
            case CUJ_SHADE_CLEAR_ALL:
                return "SHADE_CLEAR_ALL";
            case CUJ_LAUNCHER_UNLOCK_ENTRANCE_ANIMATION:
                return "LAUNCHER_UNLOCK_ENTRANCE_ANIMATION";
            case CUJ_LOCKSCREEN_OCCLUSION:
                return "LOCKSCREEN_OCCLUSION";
            case CUJ_RECENTS_SCROLLING:
                return "RECENTS_SCROLLING";
            case CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS:
                return "LAUNCHER_APP_SWIPE_TO_RECENTS";
            case CUJ_LAUNCHER_CLOSE_ALL_APPS_SWIPE:
                return "LAUNCHER_CLOSE_ALL_APPS_SWIPE";
            case CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME:
                return "LAUNCHER_CLOSE_ALL_APPS_TO_HOME";
            case CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION:
                return "LOCKSCREEN_CLOCK_MOVE_ANIMATION";
            case CUJ_LAUNCHER_OPEN_SEARCH_RESULT:
                return "LAUNCHER_OPEN_SEARCH_RESULT";
            case CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK:
                return "LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK";
            case CUJ_IME_INSETS_SHOW_ANIMATION:
                return "IME_INSETS_SHOW_ANIMATION";
            case CUJ_IME_INSETS_HIDE_ANIMATION:
                return "IME_INSETS_HIDE_ANIMATION";
            case CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER:
                return "SPLIT_SCREEN_DOUBLE_TAP_DIVIDER";
            case CUJ_LAUNCHER_UNFOLD_ANIM:
                return "LAUNCHER_UNFOLD_ANIM";
            case CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY:
                return "PREDICTIVE_BACK_CROSS_ACTIVITY";
            case CUJ_PREDICTIVE_BACK_CROSS_TASK:
                return "PREDICTIVE_BACK_CROSS_TASK";
            case CUJ_PREDICTIVE_BACK_HOME:
                return "PREDICTIVE_BACK_HOME";
            case CUJ_BACK_PANEL_ARROW:
                return "BACK_PANEL_ARROW";
            case CUJ_LAUNCHER_CLOSE_ALL_APPS_BACK:
                return "LAUNCHER_CLOSE_ALL_APPS_BACK";
            case CUJ_LAUNCHER_SEARCH_QSB_WEB_SEARCH:
                return "LAUNCHER_SEARCH_QSB_WEB_SEARCH";
            case CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE:
                return "LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE";
            case CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR:
                return "LAUNCHER_LAUNCH_APP_PAIR_FROM_TASKBAR";
            case CUJ_LAUNCHER_SAVE_APP_PAIR:
                return "LAUNCHER_SAVE_APP_PAIR";
            case CUJ_LAUNCHER_ALL_APPS_SEARCH_BACK:
                return "LAUNCHER_ALL_APPS_SEARCH_BACK";
            case CUJ_LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK:
                return "LAUNCHER_TASKBAR_ALL_APPS_CLOSE_BACK";
            case CUJ_LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK:
                return "LAUNCHER_TASKBAR_ALL_APPS_SEARCH_BACK";
            case CUJ_LAUNCHER_WIDGET_PICKER_CLOSE_BACK:
                return "LAUNCHER_WIDGET_PICKER_CLOSE_BACK";
            case CUJ_LAUNCHER_WIDGET_PICKER_SEARCH_BACK:
                return "LAUNCHER_WIDGET_PICKER_SEARCH_BACK";
            case CUJ_LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK:
                return "LAUNCHER_WIDGET_BOTTOM_SHEET_CLOSE_BACK";
            case CUJ_LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK:
                return "LAUNCHER_WIDGET_EDU_SHEET_CLOSE_BACK";
            case CUJ_LAUNCHER_PRIVATE_SPACE_LOCK:
                return "LAUNCHER_PRIVATE_SPACE_LOCK";
            case CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK:
                return "LAUNCHER_PRIVATE_SPACE_UNLOCK";
            case CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW:
                return "DESKTOP_MODE_MAXIMIZE_WINDOW";
            case CUJ_FOLD_ANIM:
                return "FOLD_ANIM";
            case CUJ_DESKTOP_MODE_RESIZE_WINDOW:
                return "DESKTOP_MODE_RESIZE_WINDOW";
            case CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD:
                return "DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD";
            case CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU:
                return "DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU";
            case CUJ_DESKTOP_MODE_EXIT_MODE:
                return "DESKTOP_MODE_EXIT_MODE";
            case CUJ_DESKTOP_MODE_MINIMIZE_WINDOW:
                return "DESKTOP_MODE_MINIMIZE_WINDOW";
            case CUJ_DESKTOP_MODE_DRAG_WINDOW:
                return "DESKTOP_MODE_DRAG_WINDOW";
            case CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP:
                return "STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP";
            case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN:
                return "LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN";
            case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE:
                return "LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE";
            case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH:
                return "LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH";
            case CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE:
                return "DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE";
            case CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE:
                return "DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE";
            case CUJ_DESKTOP_MODE_SNAP_RESIZE:
                return "DESKTOP_MODE_SNAP_RESIZE";
            case CUJ_DESKTOP_MODE_UNMAXIMIZE_WINDOW:
                return "DESKTOP_MODE_UNMAXIMIZE_WINDOW";
            case CUJ_DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU:
                return "DESKTOP_MODE_ENTER_FROM_OVERVIEW_MENU";
            case CUJ_LAUNCHER_OVERVIEW_TASK_DISMISS:
                return "LAUNCHER_OVERVIEW_TASK_DISMISS";
            case CUJ_DESKTOP_MODE_CLOSE_TASK:
                return "DESKTOP_MODE_CLOSE_TASK";
            case CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_INTENT:
                return "DESKTOP_MODE_APP_LAUNCH_FROM_INTENT";
            case CUJ_DESKTOP_MODE_APP_LAUNCH_FROM_ICON:
                return "DESKTOP_MODE_APP_LAUNCH_FROM_ICON";
            case CUJ_DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH:
                return "DESKTOP_MODE_KEYBOARD_QUICK_SWITCH_APP_LAUNCH";
            case CUJ_LAUNCHER_WORK_UTILITY_VIEW_EXPAND:
                return "LAUNCHER_WORK_UTILITY_VIEW_EXPAND";
            case CUJ_LAUNCHER_WORK_UTILITY_VIEW_SHRINK:
                return "LAUNCHER_WORK_UTILITY_VIEW_SHRINK";
            case CUJ_DEFAULT_TASK_TO_TASK_ANIMATION:
                return "DEFAULT_TASK_TO_TASK_ANIMATION";
            case CUJ_DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY:
                return "DESKTOP_MODE_MOVE_WINDOW_TO_DISPLAY";
            case CUJ_STATUS_BAR_APP_RETURN_TO_CALL_CHIP:
                return "STATUS_BAR_APP_RETURN_TO_CALL_CHIP";
            case CUJ_NOTIFICATIONS_ANIMATED_ACTION:
                return "NOTIFICATIONS_ANIMATED_ACTION";
            case CUJ_LPP_ASSIST_INVOCATION_EFFECT:
                return "LPP_ASSIST_INVOCATION_EFFECT";
            case CUJ_WEAR_CAROUSEL_SCROLL_JANK:
                return "WEAR_CAROUSEL_SCROLL_JANK";
            case CUJ_WEAR_CAROUSEL_FLING_JANK:
                return "WEAR_CAROUSEL_FLING_JANK";
            case CUJ_WEAR_CAROUSEL_SWIPE_JANK:
                return "WEAR_CAROUSEL_SWIPE_JANK";
            case CUJ_WEAR_QSS_TRAY_OPEN:
                return "WEAR_QSS_TRAY_OPEN";
            case CUJ_WEAR_NOTIFICATION_TRAY_OPEN:
                return "WEAR_NOTIFICATION_TRAY_OPEN";
            case CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE:
                return "DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE";
            case CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL:
                return "LAUNCHER_OVERVIEW_CLEAR_ALL";
            case CUJ_DESKTOP_MODE_TILE_RESIZING:
                return "DESKTOP_MODE_TILE_RESIZING";
            case CUJ_LAUNCHER_WIDGET_PICKER_OPEN:
                return "LAUNCHER_WIDGET_PICKER_OPEN";
            case CUJ_LAUNCHER_WIDGET_PICKER_APP_EXPAND:
                return "LAUNCHER_WIDGET_PICKER_APP_EXPAND";
            case CUJ_DESKTOP_MODE_MOVE_TO_SPLIT_SCREEN:
                return "DESKTOP_MODE_MOVE_TO_SPLIT_SCREEN";
            case CUJ_DESKTOP_MODE_MOVE_FROM_SPLIT_SCREEN:
                return "DESKTOP_MODE_MOVE_FROM_SPLIT_SCREEN";
            case CUJ_AMBIENT_CUE_SHOW:
                return "AMBIENT_CUE_SHOW";
            case CUJ_AMBIENT_CUE_HIDE:
                return "AMBIENT_CUE_HIDE";
            case CUJ_AMBIENT_CUE_EXPAND:
                return "AMBIENT_CUE_EXPAND";
            case CUJ_AMBIENT_CUE_COLLAPSE:
                return "AMBIENT_CUE_COLLAPSE";
            case CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_APPEAR:
                return "BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_APPEAR";
            case CUJ_BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR:
                return "BOUNCER_SECURE_LOCK_DEVICE_BIOMETRIC_AUTH_DISAPPEAR";
        }
        return "UNKNOWN";
    }

    public static int getStatsdInteractionType(@CujType int cujType) {
      if (cujType < 0 || cujType >= CUJ_TO_STATSD_INTERACTION_TYPE.length) {
        Log.e(TAG, "getStatsdInteractionType: cujType: " + cujType + " is out of range.");
        return NO_STATSD_LOGGING;
      }
      return CUJ_TO_STATSD_INTERACTION_TYPE[cujType];
    }

    /** Returns whether the measurements for the given CUJ should be written to statsd. */
    public static boolean logToStatsd(@CujType int cujType) {
        return getStatsdInteractionType(cujType) != NO_STATSD_LOGGING;
    }

    /**
     * A helper method to translate interaction type to CUJ name.
     *
     * @param interactionType the interaction type defined in AtomsProto.java
     * @return the name of the interaction type
     */
    public static String getNameOfInteraction(int interactionType) {
        // There is an offset amount of 1 between cujType and interactionType.
        return Cuj.getNameOfCuj(getCujTypeFromInteraction(interactionType));
    }

    /**
     * A helper method to translate interaction type to CUJ type.
     *
     * @param interactionType the interaction type defined in AtomsProto.java
     * @return the integer in {@link Cuj.CujType}
     */
    private static int getCujTypeFromInteraction(int interactionType) {
        return interactionType - 1;
    }
}
