summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gustav Sennton <gsennton@google.com> 2025-02-18 13:31:50 +0000
committer Gustav Sennton <gsennton@google.com> 2025-02-19 12:42:07 +0000
commit4d3dfb14937619c260a1adfce4bf6db7e90a7935 (patch)
tree765fd0e51ccfe7e62b3c72c7121d0d7b424c7b29
parent5c6fd9b60ca0aa5314c7009130af587e01766759 (diff)
Use animHandler for CUJ_DESKTOP_MODE_CLOSE_TASK
The close-animation runs on the animation thread, so we should pass the animation handler to InteractionJankMonitor. Bug: 357811393 Test: manual (perfetto) Flag: NONE jank/logging change Change-Id: I3882338ce5fa9f94a3c9b40a3dbcff5b82507c88
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/CloseDesktopTaskTransitionHandler.kt5
2 files changed, 5 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
index 79adea6749aa..02a080017fa6 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
@@ -1075,8 +1075,9 @@ public abstract class WMShellModule {
Context context,
@ShellMainThread ShellExecutor mainExecutor,
@ShellAnimationThread ShellExecutor animExecutor,
- @ShellMainThread Handler handler) {
- return new CloseDesktopTaskTransitionHandler(context, mainExecutor, animExecutor, handler);
+ @ShellAnimationThread Handler animHandler) {
+ return new CloseDesktopTaskTransitionHandler(context, mainExecutor, animExecutor,
+ animHandler);
}
@WMSingleton
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/CloseDesktopTaskTransitionHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/CloseDesktopTaskTransitionHandler.kt
index 1ce093e02a4a..b22a46edbf3a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/CloseDesktopTaskTransitionHandler.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/CloseDesktopTaskTransitionHandler.kt
@@ -37,7 +37,6 @@ import com.android.app.animation.Interpolators
import com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_CLOSE_TASK
import com.android.internal.jank.InteractionJankMonitor
import com.android.wm.shell.common.ShellExecutor
-import com.android.wm.shell.shared.annotations.ShellMainThread
import com.android.wm.shell.transition.Transitions
import java.util.function.Supplier
@@ -49,7 +48,7 @@ constructor(
private val mainExecutor: ShellExecutor,
private val animExecutor: ShellExecutor,
private val transactionSupplier: Supplier<Transaction> = Supplier { Transaction() },
- @ShellMainThread private val handler: Handler,
+ private val animHandler: Handler,
) : Transitions.TransitionHandler {
private val runningAnimations = mutableMapOf<IBinder, List<Animator>>()
@@ -95,7 +94,7 @@ constructor(
interactionJankMonitor.begin(
lastChangeLeash,
context,
- handler,
+ animHandler,
CUJ_DESKTOP_MODE_CLOSE_TASK,
)
}