From e2f5b233b55067e480b75c9bfd2b1d31426da019 Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Fri, 8 Mar 2024 09:38:35 +0000 Subject: Trigger animation start after transaction applied... for predictive back animation. Then shell can apply other transaction effect on leashes without cause flicker. The reparenting transaction for animation target to animation leash is occur in WindowAnimator, so it might happen after core dispatch leashes to shell. Bug: 328446606 Test: In shell, attach a scrim layer on animation leash asa receive it, verify no flicker occur(i.e. ag/26460881) Change-Id: If61d95bbcd00837340365523dc2cf7826efe088e --- services/core/java/com/android/server/wm/BackNavigationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index e15512678104..0b8a156e7f90 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -1686,7 +1686,7 @@ class BackNavigationController { || (wallpaperController.getWallpaperTarget() != null && wallpaperController.wallpaperTransitionReady()); if (wallpaperReady && mPendingAnimation != null) { - startAnimation(); + mWindowManagerService.mAnimator.addAfterPrepareSurfacesRunnable(this::startAnimation); } } -- cgit v1.2.3-59-g8ed1b