Loading core/java/com/android/internal/jank/Cuj.java +11 −2 Original line number Diff line number Diff line Loading @@ -155,8 +155,13 @@ public class Cuj { */ 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; // When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE. @VisibleForTesting static final int LAST_CUJ = CUJ_FOLD_ANIM; @VisibleForTesting static final int LAST_CUJ = CUJ_DESKTOP_MODE_RESIZE_WINDOW; /** @hide */ @IntDef({ Loading Loading @@ -253,7 +258,8 @@ public class Cuj { CUJ_LAUNCHER_PRIVATE_SPACE_LOCK, CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK, CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW, CUJ_FOLD_ANIM CUJ_FOLD_ANIM, CUJ_DESKTOP_MODE_RESIZE_WINDOW }) @Retention(RetentionPolicy.SOURCE) public @interface CujType {} Loading Loading @@ -361,6 +367,7 @@ public class Cuj { 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; } private Cuj() { Loading Loading @@ -567,6 +574,8 @@ public class Cuj { return "DESKTOP_MODE_MAXIMIZE_WINDOW"; case CUJ_FOLD_ANIM: return "FOLD_ANIM"; case CUJ_DESKTOP_MODE_RESIZE_WINDOW: return "DESKTOP_MODE_RESIZE_WINDOW"; } return "UNKNOWN"; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.wm.shell.windowdecor; import static android.view.WindowManager.TRANSIT_CHANGE; import static com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_RESIZE_WINDOW; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; Loading @@ -33,6 +35,7 @@ import androidx.annotation.Nullable; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.InteractionJankMonitorUtils; import com.android.wm.shell.transition.Transitions; import java.util.function.Supplier; Loading Loading @@ -89,6 +92,10 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback, mDesktopWindowDecoration.mTaskInfo.configuration.windowConfiguration.getBounds()); mRepositionStartPoint.set(x, y); if (isResizing()) { // Capture CUJ for re-sizing window in DW mode. InteractionJankMonitorUtils.beginTracing(CUJ_DESKTOP_MODE_RESIZE_WINDOW, mDesktopWindowDecoration.mContext, mDesktopWindowDecoration.mTaskSurface, /* tag= */ null); if (!mDesktopWindowDecoration.mTaskInfo.isFocused) { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.reorder(mDesktopWindowDecoration.mTaskInfo.token, true); Loading Loading @@ -146,6 +153,7 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback, // won't be called. resetVeilIfVisible(); } InteractionJankMonitorUtils.endTracing(CUJ_DESKTOP_MODE_RESIZE_WINDOW); } else { final WindowContainerTransaction wct = new WindowContainerTransaction(); DragPositioningCallbackUtility.updateTaskBounds(mRepositionTaskBounds, Loading Loading
core/java/com/android/internal/jank/Cuj.java +11 −2 Original line number Diff line number Diff line Loading @@ -155,8 +155,13 @@ public class Cuj { */ 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; // When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE. @VisibleForTesting static final int LAST_CUJ = CUJ_FOLD_ANIM; @VisibleForTesting static final int LAST_CUJ = CUJ_DESKTOP_MODE_RESIZE_WINDOW; /** @hide */ @IntDef({ Loading Loading @@ -253,7 +258,8 @@ public class Cuj { CUJ_LAUNCHER_PRIVATE_SPACE_LOCK, CUJ_LAUNCHER_PRIVATE_SPACE_UNLOCK, CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW, CUJ_FOLD_ANIM CUJ_FOLD_ANIM, CUJ_DESKTOP_MODE_RESIZE_WINDOW }) @Retention(RetentionPolicy.SOURCE) public @interface CujType {} Loading Loading @@ -361,6 +367,7 @@ public class Cuj { 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; } private Cuj() { Loading Loading @@ -567,6 +574,8 @@ public class Cuj { return "DESKTOP_MODE_MAXIMIZE_WINDOW"; case CUJ_FOLD_ANIM: return "FOLD_ANIM"; case CUJ_DESKTOP_MODE_RESIZE_WINDOW: return "DESKTOP_MODE_RESIZE_WINDOW"; } return "UNKNOWN"; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.wm.shell.windowdecor; import static android.view.WindowManager.TRANSIT_CHANGE; import static com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_RESIZE_WINDOW; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; Loading @@ -33,6 +35,7 @@ import androidx.annotation.Nullable; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.InteractionJankMonitorUtils; import com.android.wm.shell.transition.Transitions; import java.util.function.Supplier; Loading Loading @@ -89,6 +92,10 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback, mDesktopWindowDecoration.mTaskInfo.configuration.windowConfiguration.getBounds()); mRepositionStartPoint.set(x, y); if (isResizing()) { // Capture CUJ for re-sizing window in DW mode. InteractionJankMonitorUtils.beginTracing(CUJ_DESKTOP_MODE_RESIZE_WINDOW, mDesktopWindowDecoration.mContext, mDesktopWindowDecoration.mTaskSurface, /* tag= */ null); if (!mDesktopWindowDecoration.mTaskInfo.isFocused) { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.reorder(mDesktopWindowDecoration.mTaskInfo.token, true); Loading Loading @@ -146,6 +153,7 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback, // won't be called. resetVeilIfVisible(); } InteractionJankMonitorUtils.endTracing(CUJ_DESKTOP_MODE_RESIZE_WINDOW); } else { final WindowContainerTransaction wct = new WindowContainerTransaction(); DragPositioningCallbackUtility.updateTaskBounds(mRepositionTaskBounds, Loading