Loading core/java/com/android/internal/jank/InteractionJankMonitor.java +8 −1 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_SCROLL_FLING; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_AVD; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_EXIT_ANIM; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_ENTER; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_EXIT; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_RESIZE; Loading Loading @@ -272,7 +273,9 @@ public class InteractionJankMonitor { public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80; public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81; private static final int LAST_CUJ = CUJ_IME_INSETS_HIDE_ANIMATION; public static final int CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER = 82; private static final int LAST_CUJ = CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; private static final int NO_STATSD_LOGGING = -1; // Used to convert CujType to InteractionType enum value for statsd logging. Loading Loading @@ -364,6 +367,7 @@ public class InteractionJankMonitor { CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_EXPAND_FROM_STATUS_BAR] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; } private static class InstanceHolder { Loading Loading @@ -466,6 +470,7 @@ public class InteractionJankMonitor { CUJ_SHADE_EXPAND_FROM_STATUS_BAR, CUJ_IME_INSETS_SHOW_ANIMATION, CUJ_IME_INSETS_HIDE_ANIMATION, CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER, }) @Retention(RetentionPolicy.SOURCE) public @interface CujType { Loading Loading @@ -1083,6 +1088,8 @@ public class InteractionJankMonitor { 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"; } return "UNKNOWN"; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +13 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static android.view.WindowManager.DOCKED_LEFT; import static android.view.WindowManager.DOCKED_RIGHT; import static android.view.WindowManager.DOCKED_TOP; import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_RESIZE; import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_END; import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START; Loading Loading @@ -660,11 +661,23 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange set.playTogether(animator1, animator2, animator3); set.setDuration(FLING_SWITCH_DURATION); set.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { InteractionJankMonitorUtils.beginTracing(CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER, mContext, getDividerLeash(), null /*tag*/); } @Override public void onAnimationEnd(Animator animation) { mDividePosition = dividerPos; updateBounds(mDividePosition); finishCallback.accept(insets); InteractionJankMonitorUtils.endTracing(CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER); } @Override public void onAnimationCancel(Animator animation) { InteractionJankMonitorUtils.cancelTracing(CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER); } }); set.start(); Loading Loading
core/java/com/android/internal/jank/InteractionJankMonitor.java +8 −1 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_SCROLL_FLING; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_AVD; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLASHSCREEN_EXIT_ANIM; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_ENTER; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_EXIT; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_RESIZE; Loading Loading @@ -272,7 +273,9 @@ public class InteractionJankMonitor { public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80; public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81; private static final int LAST_CUJ = CUJ_IME_INSETS_HIDE_ANIMATION; public static final int CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER = 82; private static final int LAST_CUJ = CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; private static final int NO_STATSD_LOGGING = -1; // Used to convert CujType to InteractionType enum value for statsd logging. Loading Loading @@ -364,6 +367,7 @@ public class InteractionJankMonitor { CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_EXPAND_FROM_STATUS_BAR] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; } private static class InstanceHolder { Loading Loading @@ -466,6 +470,7 @@ public class InteractionJankMonitor { CUJ_SHADE_EXPAND_FROM_STATUS_BAR, CUJ_IME_INSETS_SHOW_ANIMATION, CUJ_IME_INSETS_HIDE_ANIMATION, CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER, }) @Retention(RetentionPolicy.SOURCE) public @interface CujType { Loading Loading @@ -1083,6 +1088,8 @@ public class InteractionJankMonitor { 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"; } return "UNKNOWN"; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +13 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static android.view.WindowManager.DOCKED_LEFT; import static android.view.WindowManager.DOCKED_RIGHT; import static android.view.WindowManager.DOCKED_TOP; import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_RESIZE; import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_END; import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START; Loading Loading @@ -660,11 +661,23 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange set.playTogether(animator1, animator2, animator3); set.setDuration(FLING_SWITCH_DURATION); set.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { InteractionJankMonitorUtils.beginTracing(CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER, mContext, getDividerLeash(), null /*tag*/); } @Override public void onAnimationEnd(Animator animation) { mDividePosition = dividerPos; updateBounds(mDividePosition); finishCallback.accept(insets); InteractionJankMonitorUtils.endTracing(CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER); } @Override public void onAnimationCancel(Animator animation) { InteractionJankMonitorUtils.cancelTracing(CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER); } }); set.start(); Loading