From 0cc3386d9fca43a77776a11ef66287a289251b75 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Fri, 17 Mar 2023 02:11:09 +0800 Subject: [PATCH] Exclude transient activity from hide-tasks If the recents activity does not exist, it will go the standard activity launch process, which will move the task of transient activity to top before calling setTransientLaunch. That causes it to be added into the hide-tasks and uses HIDE transition. Bug: 273770222 Test: atest NexusLauncherTests:com.android.quickstep. \ FallbackRecentsTest#testOverview Change-Id: I725a8d62377593d47e11e3ac0d6785ace0269b25 --- services/core/java/com/android/server/wm/Transition.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java index 370d304ed324e..97ee35a171a25 100644 --- a/services/core/java/com/android/server/wm/Transition.java +++ b/services/core/java/com/android/server/wm/Transition.java @@ -278,13 +278,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { setTransientLaunchToChanges(activity); if (restoreBelow != null) { + final Task transientRootTask = activity.getRootTask(); // Collect all visible activities which can be occluded by the transient activity to // make sure they are in the participants so their visibilities can be updated when // finishing transition. ((WindowContainer) restoreBelow.getParent()).forAllTasks(t -> { if (t.isVisibleRequested() && !t.isAlwaysOnTop() && !t.getWindowConfiguration().tasksAreFloating()) { - if (t.isRootTask()) { + if (t.isRootTask() && t != transientRootTask) { mTransientHideTasks.add(t); } if (t.isLeafTask()) {