Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5dc436d authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

Add CUJ for Search from homescreen.

Bug: 303105164
Test: Manual
Flag: NA, Adding constants for CUJ.

Change-Id: I8c767f5e14c0bd5880203334f6a4cac3104d9f9b
parent fbc5e550
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ public class Cuj {
     * 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;

@@ -119,10 +120,11 @@ public class Cuj {
    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;
    public static final int CUJ_LAUNCHER_SEARCH_QSB_OPEN = 87;

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

    /** @hide */
    @IntDef({
@@ -204,6 +206,7 @@ public class Cuj {
            CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY,
            CUJ_PREDICTIVE_BACK_CROSS_TASK,
            CUJ_PREDICTIVE_BACK_HOME,
            CUJ_LAUNCHER_SEARCH_QSB_OPEN,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CujType {
@@ -295,6 +298,8 @@ public class Cuj {
        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_LAUNCHER_SEARCH_QSB_OPEN] =
            FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_SEARCH_QSB_OPEN;
    }

    private Cuj() {
@@ -467,6 +472,8 @@ public class Cuj {
                return "PREDICTIVE_BACK_CROSS_TASK";
            case CUJ_PREDICTIVE_BACK_HOME:
                return "PREDICTIVE_BACK_HOME";
            case CUJ_LAUNCHER_SEARCH_QSB_OPEN:
                return "LAUNCHER_SEARCH_QSB_OPEN";
        }
        return "UNKNOWN";
    }
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public final class InteractionJankMonitorWrapper {
    public static final int CUJ_APP_SWIPE_TO_RECENTS = Cuj.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS;
    public static final int CUJ_OPEN_SEARCH_RESULT = Cuj.CUJ_LAUNCHER_OPEN_SEARCH_RESULT;
    public static final int CUJ_LAUNCHER_UNFOLD_ANIM = Cuj.CUJ_LAUNCHER_UNFOLD_ANIM;
    public static final int CUJ_SEARCH_QSB_OPEN = Cuj.CUJ_LAUNCHER_SEARCH_QSB_OPEN;

    @IntDef({
            CUJ_APP_LAUNCH_FROM_RECENTS,
@@ -66,6 +67,7 @@ public final class InteractionJankMonitorWrapper {
            CUJ_CLOSE_ALL_APPS_TO_HOME,
            CUJ_OPEN_SEARCH_RESULT,
            CUJ_LAUNCHER_UNFOLD_ANIM,
            CUJ_SEARCH_QSB_OPEN,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CujType {