From 8698cfbae44dcc6bd61517984e288eda530bb7c5 Mon Sep 17 00:00:00 2001 From: Shan Huang Date: Mon, 8 Aug 2022 23:38:52 +0000 Subject: [PATCH] Fix back to home animation restarts on a second swipe. If a second swipe starts before a back to home animation finishes, it's possible for subsequent MOVE events to start another back animation. The fix is to only start back animation when the swipe's DOWN event is not rejected. Bug: 240109403 Fixes: 240109403 Test: Follow repro steps in 240109403#10 and make sure a second animation cannot be started. Test: BackAnimationControllerTest Change-Id: Id2a5fb00f632fb9be175ef10cad7fea511d09ae0 --- .../wm/shell/back/BackAnimationController.java | 15 ++++++++++++++- .../shell/back/BackAnimationControllerTest.java | 7 ++++++- 2 files changed, 20 insertions(+), 2 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 05fafc54c2737..025fedfc164c0 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 @@ -97,6 +97,8 @@ public class BackAnimationController implements RemoteCallable