From 668eec1e08bf5f4ebc835cc50588e17e06313dea Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Wed, 31 Aug 2022 19:52:24 -0700 Subject: [PATCH] Do not change layering for non live tile tasks rendering TaskViewSimulator#onBuildTargetParams is called for every single task rendering. Given the layering change doesn't work for the non live tile case (and we shouldn't change the layering in that case anyways), an additional check is added to prevent that from happening Fixes: 242593058 Test: launch overview from home and app, and make sure that in both cases, task launch animation is intact Change-Id: Ia242dc767499689547dfa8acae56d39e9b0c3189 --- .../src/com/android/quickstep/util/TaskViewSimulator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java index d37300c7eb..0a49008225 100644 --- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java +++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java @@ -102,7 +102,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { private boolean mLayoutValid = false; private int mOrientationStateId; private SplitBounds mSplitBounds; - private boolean mDrawsBelowRecents; + private Boolean mDrawsBelowRecents = null; private boolean mIsGridTask; private int mTaskRectTranslationX; private int mTaskRectTranslationY; @@ -391,7 +391,8 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { .withWindowCrop(mTmpCropRect) .withCornerRadius(getCurrentCornerRadius()); - if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { + // If mDrawsBelowRecents is unset, no reordering will be enforced. + if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mDrawsBelowRecents != null) { // In legacy transitions, the animation leashes remain in same hierarchy in the // TaskDisplayArea, so we don't want to bump the layer too high otherwise it will // conflict with layers that WM core positions (ie. the input consumers). For shell