Loading core/java/com/android/internal/jank/Cuj.java +2 −13 Original line number Diff line number Diff line Loading @@ -435,15 +435,8 @@ public class Cuj { */ public static final int CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL = 139; /** * Track when tile resizing divider is simultaneously resizing apps. * * <p> Tracking starts when the divider move handle is dragged and ends when the drag ends. */ public static final int CUJ_DESKTOP_MODE_TILE_RESIZING = 140; // When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE. @VisibleForTesting static final int LAST_CUJ = CUJ_DESKTOP_MODE_TILE_RESIZING; @VisibleForTesting static final int LAST_CUJ = CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL; /** @hide */ @IntDef({ Loading Loading @@ -574,8 +567,7 @@ public class Cuj { CUJ_WEAR_QSS_TRAY_OPEN, CUJ_WEAR_NOTIFICATION_TRAY_OPEN, CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE, CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL, CUJ_DESKTOP_MODE_TILE_RESIZING, CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL }) @Retention(RetentionPolicy.SOURCE) public @interface CujType {} Loading Loading @@ -717,7 +709,6 @@ public class Cuj { CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_NOTIFICATION_TRAY_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_NOTIFICATION_TRAY_OPEN; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OVERVIEW_CLEAR_ALL; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_TILE_RESIZING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_TILE_RESIZING; } private Cuj() { Loading Loading @@ -992,8 +983,6 @@ public class Cuj { return "DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE"; case CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL: return "LAUNCHER_OVERVIEW_CLEAR_ALL"; case CUJ_DESKTOP_MODE_TILE_RESIZING: return "CUJ_DESKTOP_MODE_TILE_RESIZING"; } return "UNKNOWN"; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +2 −5 Original line number Diff line number Diff line Loading @@ -994,9 +994,7 @@ public abstract class WMShellModule { @ShellMainThread ShellExecutor mainExecutor, DesktopState desktopState, ShellInit shellInit, ShellController shellController, InteractionJankMonitor interactionJankMonitor ) { ShellController shellController) { return new DesktopTilingDecorViewModel( context, mainDispatcher, Loading @@ -1015,8 +1013,7 @@ public abstract class WMShellModule { mainExecutor, desktopState, shellInit, shellController, interactionJankMonitor shellController ); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/tiling/DesktopTilingDecorViewModel.kt +0 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import androidx.core.util.getOrElse import androidx.core.util.keyIterator import androidx.core.util.valueIterator import com.android.internal.annotations.VisibleForTesting import com.android.internal.jank.InteractionJankMonitor import com.android.internal.protolog.ProtoLog import com.android.wm.shell.R import com.android.wm.shell.RootTaskDisplayAreaOrganizer Loading Loading @@ -75,7 +74,6 @@ class DesktopTilingDecorViewModel( private val desktopState: DesktopState, private val shellInit: ShellInit, private val shellController: ShellController, private val interactionJankMonitor: InteractionJankMonitor, ) : DisplayChangeController.OnDisplayChangingListener { @VisibleForTesting var tilingHandlerByUserAndDeskId = SparseArray<SparseArray<DesktopTilingWindowDecoration>>() Loading Loading @@ -125,7 +123,6 @@ class DesktopTilingDecorViewModel( mainExecutor, desktopState, shellController, interactionJankMonitor, ) .also { userHandlerList[deskId] = it } } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/tiling/DesktopTilingDividerWindowManager.kt +0 −21 Original line number Diff line number Diff line Loading @@ -41,10 +41,7 @@ import android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION import android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY import android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER import android.view.WindowlessWindowManager import com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_TILE_RESIZING import com.android.internal.jank.InteractionJankMonitor import com.android.wm.shell.R import java.util.concurrent.TimeUnit import java.util.function.Supplier /** Loading @@ -60,7 +57,6 @@ class DesktopTilingDividerWindowManager( private var dividerBounds: Rect, private val displayContext: Context, private val isDarkMode: Boolean, private val interactionJankMonitor: InteractionJankMonitor, ) : WindowlessWindowManager(config, leash, null), DividerMoveCallback, View.OnLayoutChangeListener { private lateinit var viewHost: SurfaceControlViewHost private var tilingDividerView: TilingDividerView? = null Loading Loading @@ -263,22 +259,9 @@ class DesktopTilingDividerWindowManager( override fun onDividerMoveStart(pos: Int, motionEvent: MotionEvent) { setSlippery(false) beginJankMonitoring() transitionHandler.onDividerHandleDragStart(motionEvent) } private fun beginJankMonitoring() { val dividerView = tilingDividerView ?: return interactionJankMonitor.begin( InteractionJankMonitor.Configuration.Builder.withView(CUJ_DESKTOP_MODE_TILE_RESIZING, dividerView) .setTimeout(LONG_CUJ_TIMEOUT_MS) ) } private fun endJankMonitoring() { interactionJankMonitor.end(CUJ_DESKTOP_MODE_TILE_RESIZING) } /** * Moves the divider view to a new position after touch, gets called from the * [TilingDividerView] onTouch function. Loading @@ -297,7 +280,6 @@ class DesktopTilingDividerWindowManager( */ override fun onDividerMovedEnd(pos: Int, motionEvent: MotionEvent) { setSlippery(true) endJankMonitoring() val t = transactionSupplier.get() t.setPosition(leash, pos.toFloat() - maxRoundedCornerRadius, dividerBounds.top.toFloat()) val dividerWidth = dividerBounds.width() Loading Loading @@ -380,8 +362,5 @@ class DesktopTilingDividerWindowManager( companion object { private const val DIVIDER_FADE_IN_ALPHA_DURATION = 300L private const val DIVIDER_FADE_IN_ALPHA_SLOW_DURATION = 900L // Timeout used for resize and drag CUJs, this is longer than the default timeout to avoid // timing out in the middle of a resize or drag action. private val LONG_CUJ_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(10L) } } libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/tiling/DesktopTilingWindowDecoration.kt +0 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.window.TransitionInfo.Change import android.window.TransitionRequestInfo import android.window.WindowContainerTransaction import com.android.internal.annotations.VisibleForTesting import com.android.internal.jank.InteractionJankMonitor import com.android.launcher3.icons.BaseIconFactory import com.android.wm.shell.R import com.android.wm.shell.RootTaskDisplayAreaOrganizer Loading Loading @@ -95,7 +94,6 @@ class DesktopTilingWindowDecoration( @ShellMainThread private val mainExecutor: ShellExecutor, private val desktopState: DesktopState, private val shellController: ShellController, private val interactionJankMonitor: InteractionJankMonitor, private val transactionSupplier: Supplier<Transaction> = Supplier { Transaction() }, ) : Transitions.TransitionHandler, Loading Loading @@ -266,7 +264,6 @@ class DesktopTilingWindowDecoration( dividerBounds, displayContext, isDarkMode, interactionJankMonitor ) } // a leash to present the divider on top of, without re-parenting. Loading Loading
core/java/com/android/internal/jank/Cuj.java +2 −13 Original line number Diff line number Diff line Loading @@ -435,15 +435,8 @@ public class Cuj { */ public static final int CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL = 139; /** * Track when tile resizing divider is simultaneously resizing apps. * * <p> Tracking starts when the divider move handle is dragged and ends when the drag ends. */ public static final int CUJ_DESKTOP_MODE_TILE_RESIZING = 140; // When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE. @VisibleForTesting static final int LAST_CUJ = CUJ_DESKTOP_MODE_TILE_RESIZING; @VisibleForTesting static final int LAST_CUJ = CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL; /** @hide */ @IntDef({ Loading Loading @@ -574,8 +567,7 @@ public class Cuj { CUJ_WEAR_QSS_TRAY_OPEN, CUJ_WEAR_NOTIFICATION_TRAY_OPEN, CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE, CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL, CUJ_DESKTOP_MODE_TILE_RESIZING, CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL }) @Retention(RetentionPolicy.SOURCE) public @interface CujType {} Loading Loading @@ -717,7 +709,6 @@ public class Cuj { CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WEAR_NOTIFICATION_TRAY_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__WEAR_NOTIFICATION_TRAY_OPEN; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_OVERVIEW_CLEAR_ALL; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_TILE_RESIZING] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_TILE_RESIZING; } private Cuj() { Loading Loading @@ -992,8 +983,6 @@ public class Cuj { return "DESKTOP_MODE_SHADE_WINDOW_DISPLAY_CHANGE"; case CUJ_LAUNCHER_OVERVIEW_CLEAR_ALL: return "LAUNCHER_OVERVIEW_CLEAR_ALL"; case CUJ_DESKTOP_MODE_TILE_RESIZING: return "CUJ_DESKTOP_MODE_TILE_RESIZING"; } return "UNKNOWN"; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +2 −5 Original line number Diff line number Diff line Loading @@ -994,9 +994,7 @@ public abstract class WMShellModule { @ShellMainThread ShellExecutor mainExecutor, DesktopState desktopState, ShellInit shellInit, ShellController shellController, InteractionJankMonitor interactionJankMonitor ) { ShellController shellController) { return new DesktopTilingDecorViewModel( context, mainDispatcher, Loading @@ -1015,8 +1013,7 @@ public abstract class WMShellModule { mainExecutor, desktopState, shellInit, shellController, interactionJankMonitor shellController ); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/tiling/DesktopTilingDecorViewModel.kt +0 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import androidx.core.util.getOrElse import androidx.core.util.keyIterator import androidx.core.util.valueIterator import com.android.internal.annotations.VisibleForTesting import com.android.internal.jank.InteractionJankMonitor import com.android.internal.protolog.ProtoLog import com.android.wm.shell.R import com.android.wm.shell.RootTaskDisplayAreaOrganizer Loading Loading @@ -75,7 +74,6 @@ class DesktopTilingDecorViewModel( private val desktopState: DesktopState, private val shellInit: ShellInit, private val shellController: ShellController, private val interactionJankMonitor: InteractionJankMonitor, ) : DisplayChangeController.OnDisplayChangingListener { @VisibleForTesting var tilingHandlerByUserAndDeskId = SparseArray<SparseArray<DesktopTilingWindowDecoration>>() Loading Loading @@ -125,7 +123,6 @@ class DesktopTilingDecorViewModel( mainExecutor, desktopState, shellController, interactionJankMonitor, ) .also { userHandlerList[deskId] = it } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/tiling/DesktopTilingDividerWindowManager.kt +0 −21 Original line number Diff line number Diff line Loading @@ -41,10 +41,7 @@ import android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION import android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY import android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER import android.view.WindowlessWindowManager import com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_TILE_RESIZING import com.android.internal.jank.InteractionJankMonitor import com.android.wm.shell.R import java.util.concurrent.TimeUnit import java.util.function.Supplier /** Loading @@ -60,7 +57,6 @@ class DesktopTilingDividerWindowManager( private var dividerBounds: Rect, private val displayContext: Context, private val isDarkMode: Boolean, private val interactionJankMonitor: InteractionJankMonitor, ) : WindowlessWindowManager(config, leash, null), DividerMoveCallback, View.OnLayoutChangeListener { private lateinit var viewHost: SurfaceControlViewHost private var tilingDividerView: TilingDividerView? = null Loading Loading @@ -263,22 +259,9 @@ class DesktopTilingDividerWindowManager( override fun onDividerMoveStart(pos: Int, motionEvent: MotionEvent) { setSlippery(false) beginJankMonitoring() transitionHandler.onDividerHandleDragStart(motionEvent) } private fun beginJankMonitoring() { val dividerView = tilingDividerView ?: return interactionJankMonitor.begin( InteractionJankMonitor.Configuration.Builder.withView(CUJ_DESKTOP_MODE_TILE_RESIZING, dividerView) .setTimeout(LONG_CUJ_TIMEOUT_MS) ) } private fun endJankMonitoring() { interactionJankMonitor.end(CUJ_DESKTOP_MODE_TILE_RESIZING) } /** * Moves the divider view to a new position after touch, gets called from the * [TilingDividerView] onTouch function. Loading @@ -297,7 +280,6 @@ class DesktopTilingDividerWindowManager( */ override fun onDividerMovedEnd(pos: Int, motionEvent: MotionEvent) { setSlippery(true) endJankMonitoring() val t = transactionSupplier.get() t.setPosition(leash, pos.toFloat() - maxRoundedCornerRadius, dividerBounds.top.toFloat()) val dividerWidth = dividerBounds.width() Loading Loading @@ -380,8 +362,5 @@ class DesktopTilingDividerWindowManager( companion object { private const val DIVIDER_FADE_IN_ALPHA_DURATION = 300L private const val DIVIDER_FADE_IN_ALPHA_SLOW_DURATION = 900L // Timeout used for resize and drag CUJs, this is longer than the default timeout to avoid // timing out in the middle of a resize or drag action. private val LONG_CUJ_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(10L) } }
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/tiling/DesktopTilingWindowDecoration.kt +0 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.window.TransitionInfo.Change import android.window.TransitionRequestInfo import android.window.WindowContainerTransaction import com.android.internal.annotations.VisibleForTesting import com.android.internal.jank.InteractionJankMonitor import com.android.launcher3.icons.BaseIconFactory import com.android.wm.shell.R import com.android.wm.shell.RootTaskDisplayAreaOrganizer Loading Loading @@ -95,7 +94,6 @@ class DesktopTilingWindowDecoration( @ShellMainThread private val mainExecutor: ShellExecutor, private val desktopState: DesktopState, private val shellController: ShellController, private val interactionJankMonitor: InteractionJankMonitor, private val transactionSupplier: Supplier<Transaction> = Supplier { Transaction() }, ) : Transitions.TransitionHandler, Loading Loading @@ -266,7 +264,6 @@ class DesktopTilingWindowDecoration( dividerBounds, displayContext, isDarkMode, interactionJankMonitor ) } // a leash to present the divider on top of, without re-parenting. Loading