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

Commit 63a49a11 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only update latest surface visibility for transition participants" into main

parents c9309197 1bd15850
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -486,6 +486,19 @@ class TransitionController {
        return false;
    }

    /**
     * Returns {@code true} if the `wc` is a participant of a playing transition even if it is not
     * the playing target, e.g. its {@link Transition.ChangeInfo#hasChanged()} is false.
     */
    boolean isParticipantOfPlayingTransition(@NonNull WindowContainer<?> wc) {
        for (int i = mPlayingTransitions.size() - 1; i >= 0; --i) {
            if (mPlayingTransitions.get(i).mParticipants.contains(wc)) {
                return true;
            }
        }
        return false;
    }

    /** Returns {@code true} if the finishing transition contains `wc`. */
    boolean inFinishingTransition(WindowContainer<?> wc) {
        return mFinishingTransition != null && mFinishingTransition.isInTransition(wc);
+5 −0
Original line number Diff line number Diff line
@@ -302,6 +302,11 @@ public class WindowAnimator {
            // Let the transition handle surface visibility.
            return;
        }
        if (controller.isParticipantOfPlayingTransition(wc)) {
            // Non-target participants will still be updated when the transition is finished, so
            // skip the intermediate state.
            return;
        }
        wc.updateSurfaceVisibility(mTransaction);
    }