Merge "Put change type below closing type for a close transition" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-08 09:39:41 +00:00
committed by Android (Google) Code Review

View File

@@ -501,7 +501,9 @@ public class Transitions implements RemoteCallable<Transitions>,
*/
private static void setupAnimHierarchy(@NonNull TransitionInfo info,
@NonNull SurfaceControl.Transaction t, @NonNull SurfaceControl.Transaction finishT) {
boolean isOpening = isOpeningType(info.getType());
final int type = info.getType();
final boolean isOpening = isOpeningType(type);
final boolean isClosing = isClosingType(type);
for (int i = 0; i < info.getRootCount(); ++i) {
t.show(info.getRoot(i).getLeash());
}
@@ -554,7 +556,13 @@ public class Transitions implements RemoteCallable<Transitions>,
layer = zSplitLine + numChanges - i;
}
} else { // CHANGE or other
layer = zSplitLine + numChanges - i;
if (isClosing) {
// Put below CLOSE mode.
layer = zSplitLine - i;
} else {
// Put above CLOSE mode.
layer = zSplitLine + numChanges - i;
}
}
t.setLayer(leash, layer);
}