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

Commit 48d8b2d9 authored by Chris Li's avatar Chris Li Committed by Android Build Coastguard Worker
Browse files

Ignore transition if not collecting

Bug: 346196958
Test: manual
Flag: com.android.window.flags.always_defer_transition_when_apply_wct
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4a196cc4800c527cfb09d20ba1c04603d74ee67)
Merged-In: I78bcb83fdb13d8f3804837d52d5072c813ff74fb
Change-Id: I78bcb83fdb13d8f3804837d52d5072c813ff74fb
parent 1809be44
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -610,10 +610,16 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
        ProtoLog.v(WM_DEBUG_WINDOW_ORGANIZER, "Apply window transaction, syncId=%d", syncId);
        mService.deferWindowLayout();
        mService.mTaskSupervisor.setDeferRootVisibilityUpdate(true /* deferUpdate */);
        final boolean shouldDeferTransitionReady = transition != null && !t.isEmpty()
                && (transition.isCollecting() || Flags.alwaysDeferTransitionWhenApplyWct());
        if (shouldDeferTransitionReady) {
        boolean deferTransitionReady = false;
        if (transition != null && !t.isEmpty()) {
            if (transition.isCollecting()) {
                deferTransitionReady = true;
                transition.deferTransitionReady();
            } else if (Flags.alwaysDeferTransitionWhenApplyWct()) {
                Slog.w(TAG, "Transition is not collecting when applyTransaction."
                        + " transition=" + transition + " state=" + transition.getState());
                transition = null;
            }
        }
        try {
            final ArraySet<WindowContainer<?>> haveConfigChanges = new ArraySet<>();
@@ -767,7 +773,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                mService.mWindowManager.mWindowPlacerLocked.requestTraversal();
            }
        } finally {
            if (shouldDeferTransitionReady) {
            if (deferTransitionReady) {
                transition.continueTransitionReady();
            }
            mService.mTaskSupervisor.setDeferRootVisibilityUpdate(false /* deferUpdate */);