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

Commit 9810dda4 authored by Jack Richardson's avatar Jack Richardson Committed by Android (Google) Code Review
Browse files

Merge "Revert^2 "Add Wear Tiles Carousel jank CUJ"" into main

parents e4024237 1fd818d5
Loading
Loading
Loading
Loading
+63 −2
Original line number Diff line number Diff line
@@ -347,9 +347,58 @@ public class Cuj {
     */
    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;

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

    /** @hide */
    @IntDef({
@@ -473,7 +522,10 @@ public class Cuj {
            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_LPP_ASSIST_INVOCATION_EFFECT,
            CUJ_WEAR_CAROUSEL_SCROLL_JANK,
            CUJ_WEAR_CAROUSEL_FLING_JANK,
            CUJ_WEAR_CAROUSEL_SWIPE_JANK
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CujType {}
@@ -608,6 +660,9 @@ public class Cuj {
        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;
    }

    private Cuj() {
@@ -868,6 +923,12 @@ public class Cuj {
                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";
        }
        return "UNKNOWN";
    }