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

Commit 7b46b986 authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Move VisualIndicator logic to a separate UI thread." into main

parents 59ca8306 79aa62b4
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -134,6 +134,7 @@ import com.android.wm.shell.recents.RecentsTransitionHandler;
import com.android.wm.shell.shared.TransactionPool;
import com.android.wm.shell.shared.TransactionPool;
import com.android.wm.shell.shared.annotations.ShellAnimationThread;
import com.android.wm.shell.shared.annotations.ShellAnimationThread;
import com.android.wm.shell.shared.annotations.ShellBackgroundThread;
import com.android.wm.shell.shared.annotations.ShellBackgroundThread;
import com.android.wm.shell.shared.annotations.ShellDesktopThread;
import com.android.wm.shell.shared.annotations.ShellMainThread;
import com.android.wm.shell.shared.annotations.ShellMainThread;
import com.android.wm.shell.shared.desktopmode.DesktopModeCompatPolicy;
import com.android.wm.shell.shared.desktopmode.DesktopModeCompatPolicy;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
@@ -750,6 +751,7 @@ public abstract class WMShellModule {
            MultiInstanceHelper multiInstanceHelper,
            MultiInstanceHelper multiInstanceHelper,
            @ShellMainThread ShellExecutor mainExecutor,
            @ShellMainThread ShellExecutor mainExecutor,
            @ShellMainThread Handler mainHandler,
            @ShellMainThread Handler mainHandler,
            @ShellDesktopThread ShellExecutor desktopExecutor,
            Optional<DesktopTasksLimiter> desktopTasksLimiter,
            Optional<DesktopTasksLimiter> desktopTasksLimiter,
            Optional<RecentTasksController> recentTasksController,
            Optional<RecentTasksController> recentTasksController,
            InteractionJankMonitor interactionJankMonitor,
            InteractionJankMonitor interactionJankMonitor,
@@ -789,6 +791,7 @@ public abstract class WMShellModule {
                recentsTransitionHandler,
                recentsTransitionHandler,
                multiInstanceHelper,
                multiInstanceHelper,
                mainExecutor,
                mainExecutor,
                desktopExecutor,
                desktopTasksLimiter,
                desktopTasksLimiter,
                recentTasksController.orElse(null),
                recentTasksController.orElse(null),
                interactionJankMonitor,
                interactionJankMonitor,
+41 −364

File changed.

Preview size limit exceeded, changes collapsed.

+12 −20

File changed.

Preview size limit exceeded, changes collapsed.

+5 −5
Original line number Original line Diff line number Diff line
@@ -642,7 +642,7 @@ sealed class DragToDesktopTransitionHandler(
                startPosition.y.toInt() + unscaledStartHeight,
                startPosition.y.toInt() + unscaledStartHeight,
            )
            )


        dragToDesktopStateListener?.onCommitToDesktopAnimationStart(startTransaction)
        dragToDesktopStateListener?.onCommitToDesktopAnimationStart()
        // Accept the merge by applying the merging transaction (applied by #showResizeVeil)
        // Accept the merge by applying the merging transaction (applied by #showResizeVeil)
        // and finish callback. Show the veil and position the task at the first frame before
        // and finish callback. Show the veil and position the task at the first frame before
        // starting the final animation.
        // starting the final animation.
@@ -773,7 +773,7 @@ sealed class DragToDesktopTransitionHandler(
                addListener(
                addListener(
                    object : AnimatorListenerAdapter() {
                    object : AnimatorListenerAdapter() {
                        override fun onAnimationEnd(animation: Animator) {
                        override fun onAnimationEnd(animation: Animator) {
                            dragToDesktopStateListener?.onCancelToDesktopAnimationEnd(tx)
                            dragToDesktopStateListener?.onCancelToDesktopAnimationEnd()
                            // Start the cancel transition to restore order.
                            // Start the cancel transition to restore order.
                            startCancelDragToDesktopTransition()
                            startCancelDragToDesktopTransition()
                        }
                        }
@@ -866,9 +866,9 @@ sealed class DragToDesktopTransitionHandler(
    )
    )


    interface DragToDesktopStateListener {
    interface DragToDesktopStateListener {
        fun onCommitToDesktopAnimationStart(tx: SurfaceControl.Transaction)
        fun onCommitToDesktopAnimationStart()


        fun onCancelToDesktopAnimationEnd(tx: SurfaceControl.Transaction)
        fun onCancelToDesktopAnimationEnd()
    }
    }


    sealed class TransitionState {
    sealed class TransitionState {
@@ -1081,7 +1081,7 @@ constructor(
        val startBoundsWithOffset =
        val startBoundsWithOffset =
            Rect(startBounds).apply { offset(startPosition.x.toInt(), startPosition.y.toInt()) }
            Rect(startBounds).apply { offset(startPosition.x.toInt(), startPosition.y.toInt()) }


        dragToDesktopStateListener?.onCommitToDesktopAnimationStart(startTransaction)
        dragToDesktopStateListener?.onCommitToDesktopAnimationStart()
        // Accept the merge by applying the merging transaction (applied by #showResizeVeil)
        // Accept the merge by applying the merging transaction (applied by #showResizeVeil)
        // and finish callback. Show the veil and position the task at the first frame before
        // and finish callback. Show the veil and position the task at the first frame before
        // starting the final animation.
        // starting the final animation.
+6 −4

File changed.

Preview size limit exceeded, changes collapsed.

Loading