Merge "Swap z-order of tasks for default wallpaper-open animation" into udc-dev am: 34fb513c85 am: 441c242258

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23149774

Change-Id: I257a4a4d4cb76cbc27ef78bd863a6a389679595d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Evan Rosky
2023-05-12 06:04:44 +00:00
committed by Automerger Merge Worker

View File

@@ -435,6 +435,23 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
backgroundColorForTransition =
uiContext.getColor(R.color.overview_background);
}
if (wallpaperTransit == WALLPAPER_TRANSITION_OPEN
&& TransitionUtil.isOpeningType(info.getType())) {
// Need to flip the z-order of opening/closing because the WALLPAPER_OPEN
// always animates the closing task over the opening one while
// traditionally, an OPEN transition animates the opening over the closing.
// See Transitions#setupAnimHierarchy for details about these variables.
final int numChanges = info.getChanges().size();
final int zSplitLine = numChanges + 1;
if (TransitionUtil.isOpeningType(mode)) {
final int layer = zSplitLine - i;
startTransaction.setLayer(change.getLeash(), layer);
} else if (TransitionUtil.isClosingType(mode)) {
final int layer = zSplitLine + numChanges - i;
startTransaction.setLayer(change.getLeash(), layer);
}
}
}
final float cornerRadius;