From 96af0f37cb1bc3a376b50193f232e5303dc7468e Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Mon, 20 Mar 2023 15:36:04 -0700 Subject: [PATCH] Make the transition sleep failsafe stricter The original check was too lenient and assuming that the handlers would finish. However, this is supposed to be a hammer so make it always go down the force path if there is any other transition playing or ready. Bug: 267738124 Test: sleep while animation is playing. Change-Id: Id08ad965ecfcc831a472356d723b4ee1e419a746 --- .../Shell/src/com/android/wm/shell/transition/Transitions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java index 039bde95815eb..b8b6d5b96a934 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java @@ -534,7 +534,7 @@ public class Transitions implements RemoteCallable { } if (info.getType() == TRANSIT_SLEEP) { - if (activeIdx > 0) { + if (activeIdx > 0 || !mActiveTransitions.isEmpty() || mReadyTransitions.size() > 1) { // Sleep starts a process of forcing all prior transitions to finish immediately finishForSleep(null /* forceFinish */); return;