Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77e889f2 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent 35f2750e
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -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,8 +558,14 @@ public class Transitions implements RemoteCallable<Transitions>,
                    layer = zSplitLine + numChanges - i;
                }
            } else { // CHANGE or other
                if (isClosing) {
                    // Put below CLOSE mode.
                    layer = zSplitLine - i;
                } else {
                    // Put above CLOSE mode.
                    layer = zSplitLine + numChanges - i;
                }
            }
            t.setLayer(leash, layer);
        }
    }