Do not use prefixOrderIndex for animation layer

We may set a z-order different from the prefix order, for example
TaskDisplayArea#adjustRootTaskLayer. As a result, we should no longer
set animation leash layer based on the prefix order.

Fix: 208793409
Test: manually test launching activity over another
Change-Id: If8d545ca7a9ac42162262ad3a8f95b4ac9f65585
This commit is contained in:
Chris Li
2021-12-03 20:50:00 +08:00
parent 7834387feb
commit 91010a79de
2 changed files with 4 additions and 1 deletions

View File

@@ -129,7 +129,11 @@ public class RemoteAnimationTarget implements Parcelable {
* The index of the element in the tree in prefix order. This should be used for z-layering
* to preserve original z-layer order in the hierarchy tree assuming no "boosting" needs to
* happen.
* @deprecated WindowManager may set a z-order different from the prefix order, and has set the
* correct layer for the animation leash already, so this should not be used for
* layer any more.
*/
@Deprecated
@UnsupportedAppUsage
public final int prefixOrderIndex;

View File

@@ -436,7 +436,6 @@ class ActivityLaunchAnimator(private val launchAnimator: LaunchAnimator) {
.withAlpha(1f)
.withMatrix(matrix)
.withWindowCrop(windowCrop)
.withLayer(window.prefixOrderIndex)
.withCornerRadius(cornerRadius)
.withVisibility(true)
.build()