From 708287bc782f108ab8433057860b996c1c0832f5 Mon Sep 17 00:00:00 2001 From: Arthur Hung Date: Thu, 9 Mar 2023 14:11:16 +0000 Subject: [PATCH] Fix back animation doesn't work when triggered a second time Check the participated containers to see if any container in the back target when handling the defered animation, and ensure the targets which are promoted from the participated containers could be visible. This also added the timeout mechanism when back gesture released, that could prevent it stuck for waiting the `startAnimation` called. Bug: 271599041 Test: atest BackAnimationControllerTest Change-Id: I473d218f61646932b9e2421096191c215d9a9705 --- .../shell/back/BackAnimationController.java | 8 ++-- .../back/BackAnimationControllerTest.java | 16 ++++++++ .../server/wm/BackNavigationController.java | 40 +++++++++++-------- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java index 210c9aab14d66..04f8477eb749a 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java @@ -561,6 +561,9 @@ public class BackAnimationController implements RemoteCallable