From a1a6f7a5938c23e6f76798395bd299f0c8571163 Mon Sep 17 00:00:00 2001 From: Kazuki Takise Date: Wed, 20 May 2020 15:02:58 +0900 Subject: [PATCH] Trigger app transition explicitly when nothing gets resumed Currently, even if a freeform task gets moved back, the app transition doens't start until timeout happens because usually resuming a top activity triggers OPENING/CLOSING transactions, but nothing gets newly resumed in this case. Bug: 157104277 Test: Minimizing a freeform window works without timeout. Change-Id: I420909156a72a191f1b22dc41ea0b350d91fb2fb --- services/core/java/com/android/server/wm/ActivityStack.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java index 593e5e73a3b95..7fa90acae54aa 100644 --- a/services/core/java/com/android/server/wm/ActivityStack.java +++ b/services/core/java/com/android/server/wm/ActivityStack.java @@ -2613,6 +2613,9 @@ class ActivityStack extends Task { mRootWindowContainer.ensureVisibilityAndConfig(null /* starting */, getDisplay().mDisplayId, false /* markFrozenIfConfigChanged */, false /* deferResume */); + // Usually resuming a top activity triggers the next app transition, but nothing's got + // resumed in this case, so we need to execute it explicitly. + getDisplay().mDisplayContent.executeAppTransition(); } else { mRootWindowContainer.resumeFocusedStacksTopActivities(); }