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

Commit bd88ab69 authored by Evan Rosky's avatar Evan Rosky
Browse files

Don't apply transactions of abort out-of-order.

We've started to use abort for more than just aborting (ie.
we abort for certain transitions we consider "hidden"). As a
result, we actually do need to maintain it's apply ordering
with other transitions. So, apply it's startT and finishT
at the "normal" times (ie. when it is taken off ready queue.

Bug: 283887866
Test: observe winscope in ctsverifier test from bug.
Change-Id: Ie063de29ea7a81e5874bfe7c35b29665170b362a
parent 4b9f5eb5
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -809,6 +809,9 @@ public class Transitions implements RemoteCallable<Transitions>,
            track.mReadyTransitions.remove(0);
            track.mActiveTransition = ready;
            if (ready.mAborted) {
                if (ready.mStartT != null) {
                    ready.mStartT.apply();
                }
                // finish now since there's nothing to animate. Calls back into processReadyQueue
                onFinish(ready, null, null);
                return;
@@ -936,10 +939,6 @@ public class Transitions implements RemoteCallable<Transitions>,
    /** Aborts a transition. This will still queue it up to maintain order. */
    private void onAbort(ActiveTransition transition) {
        final Track track = mTracks.get(transition.getTrack());
        // apply immediately since they may be "parallel" operations: We currently we use abort for
        // thing which are independent to other transitions (like starting-window transfer).
        transition.mStartT.apply();
        transition.mFinishT.apply();
        transition.mAborted = true;

        mTracer.logAborted(transition.mInfo.getDebugId());