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

Commit 906c8f0f authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Set display change ready only if no one sets

Otherwise it will break some cases explicitly set ready to false,
such as if there is activity switch.

Bug: 268506437
Test: atest NexusLauncherTests:TaplTestsLauncher3
Test: Simulate the sequence: setRequestedOrientation()
       -> finishActivity() -> startTransition().
      The task surface should be visible.
Change-Id: Ie76092420a9285401818fd96fe36971e2890cb3d
parent a9233ab0
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2019,9 +2019,15 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            final DisplayContent dc = wc.asDisplayContent();
            if (dc == null || !mChanges.get(dc).hasChanged()) continue;
            dc.sendNewConfiguration();
            // Set to ready if no other change controls the ready state. But if there is, such as
            // if an activity is pausing, it will call setReady(ar, false) and wait for the next
            // resumed activity. Then do not set to ready because the transition only contains
            // partial participants. Otherwise the transition may only handle HIDE and miss OPEN.
            if (!mReadyTracker.mUsed) {
                setReady(dc, true);
            }
        }
    }

    boolean getLegacyIsReady() {
        return isCollecting() && mSyncId >= 0;