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

Commit 43a41339 authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

Add CUJ for launching search results.

Bug: 265134143
Test: recorded perfetto trace, see bug
Change-Id: I936ec84a7b035c4fb74c415ea78bcc4899cda5c7
parent 356277f8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_SWIPE;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_TO_HOME;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_ALL_APPS;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_SEARCH_RESULT;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_QUICK_SWITCH;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_UNLOCK_ENTRANCE_ANIMATION;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_CLOCK_MOVE_ANIMATION;
@@ -244,6 +245,7 @@ public class InteractionJankMonitor {
    public static final int CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME = 68;
    public static final int CUJ_IME_INSETS_ANIMATION = 69;
    public static final int CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION = 70;
    public static final int CUJ_LAUNCHER_OPEN_SEARCH_RESULT = 71;

    private static final int NO_STATSD_LOGGING = -1;

@@ -323,6 +325,7 @@ public class InteractionJankMonitor {
            UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_CLOSE_ALL_APPS_TO_HOME,
            UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_ANIMATION,
            UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_CLOCK_MOVE_ANIMATION,
            UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OPEN_SEARCH_RESULT,
    };

    private static class InstanceHolder {
@@ -418,6 +421,7 @@ public class InteractionJankMonitor {
            CUJ_LAUNCHER_CLOSE_ALL_APPS_TO_HOME,
            CUJ_IME_INSETS_ANIMATION,
            CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION,
            CUJ_LAUNCHER_OPEN_SEARCH_RESULT,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CujType {
@@ -968,6 +972,8 @@ public class InteractionJankMonitor {
                return "IME_INSETS_ANIMATION";
            case CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION:
                return "LOCKSCREEN_CLOCK_MOVE_ANIMATION";
            case CUJ_LAUNCHER_OPEN_SEARCH_RESULT:
                return "LAUNCHER_OPEN_SEARCH_RESULT";
        }
        return "UNKNOWN";
    }
+4 −1
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ public final class InteractionJankMonitorWrapper {
            InteractionJankMonitor.CUJ_RECENTS_SCROLLING;
    public static final int CUJ_APP_SWIPE_TO_RECENTS =
            InteractionJankMonitor.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS;
    public static final int CUJ_OPEN_SEARCH_RESULT =
            InteractionJankMonitor.CUJ_LAUNCHER_OPEN_SEARCH_RESULT;

    @IntDef({
            CUJ_APP_LAUNCH_FROM_RECENTS,
@@ -72,7 +74,8 @@ public final class InteractionJankMonitorWrapper {
            CUJ_APP_SWIPE_TO_RECENTS,
            CUJ_OPEN_ALL_APPS,
            CUJ_CLOSE_ALL_APPS_SWIPE,
            CUJ_CLOSE_ALL_APPS_TO_HOME
            CUJ_CLOSE_ALL_APPS_TO_HOME,
            CUJ_OPEN_SEARCH_RESULT,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CujType {