diff options
| author | 2024-11-04 02:44:43 +0000 | |
|---|---|---|
| committer | 2024-11-04 06:28:12 +0000 | |
| commit | e1eb9af2f77642d4189597bb242dda2c4a5800cb (patch) | |
| tree | 6418fd224e3e5411194ad77cda6c42fa7885a9ab | |
| parent | 13c28f4be710ef61abf578a01c5a9794f646e8a6 (diff) | |
Do not start pending animation if another transition is collecting.
If another transition is collecting, something else is happening and
the BackTransitionHandler cannot handle the transition, so cancel the
predictive back animation to allow the collecting transition to proceed.
Flag: EXEMPT bugfix
Bug: 376582378
Test: presubmit
Change-Id: Ie8a3bb25003d04a1758431707b291552c33925a4
| -rw-r--r-- | services/core/java/com/android/server/wm/BackNavigationController.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index de6a2cf64a61..ab736f2ee5dc 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -1025,6 +1025,12 @@ class BackNavigationController { return; } + if (mWindowManagerService.mRoot.mTransitionController.isCollecting()) { + Slog.v(TAG, "Skip predictive back transition, another transition is collecting"); + cancelPendingAnimation(); + return; + } + // Ensure the final animation targets which hidden by transition could be visible. for (int i = 0; i < targets.size(); i++) { final WindowContainer wc = targets.get(i).mContainer; @@ -1053,6 +1059,7 @@ class BackNavigationController { Slog.e(TAG, "Remote animation gone", e); } mPendingAnimationBuilder = null; + mNavigationMonitor.stopMonitorTransition(); } /** |