Put change type below closing type for a close transition
Assume a translucent task is closing, the next visible task
may be added to transition participant by collectOrderChanges
as the task is moving to the foreground. Then the transition
info will be {CLOSE, top:CHANGE, bottom:CLOSE}.
So the z-order will be:
numChanges=2
zSplitLine=3
CLOSE=3+2-1=4
CHANGE=3+2-0=5
Then the CLOSE is occluded by the CHANGE incorrectly.
Bug: 281010752
Test: Launch a translucent activity from launcher and it calls
Activity#finishAndRemoveTask(). The activity should not
be covered by the icon on launcher during animation.
Change-Id: I1236946c867abf1b93fca39c4dd9ed114118c051
This commit is contained in:
@@ -503,7 +503,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());
|
||||
}
|
||||
@@ -556,7 +558,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user