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

Commit 3d9e35cc authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Apply display change for non-started transition

In normal case, the new display configuration is applied from
WindowOrganizerController#startTransition -> applyTransaction
-> Transition#applyDisplayChangeIfNeeded
-> DisplatContent#sendNewConfiguration.

But if shell is somehow no response and the transition timeout
reaches, sendNewConfiguration still needs to be called. Otherwise
the display still stays with old configuration and the surface
placement is even paused by DisplayContent#mWaitingForConfig.

Bug: 334838294
Flag: EXEMPT bugfix
Test: Add sleep >2s at shell's
      TransitionPlayerImpl#requestStartTransition
      The rotation animation can still play with the delay.
Change-Id: I9ab7999ee927ba44474341ee7ee6fb89493d7777
parent b770541d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -3513,11 +3513,16 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            Slog.e(TAG, "#" + mSyncId + " readiness timeout, used=" + mReadyTrackerOld.mUsed
                    + " deferReadyDepth=" + mReadyTrackerOld.mDeferReadyDepth
                    + " group=" + mReadyTrackerOld.mReadyGroups);
            return;
        }
        } else {
            Slog.e(TAG, "#" + mSyncId + " met conditions: " + mReadyTracker.mMet);
            Slog.e(TAG, "#" + mSyncId + " unmet conditions: " + mReadyTracker.mConditions);
        }
        // Make sure the pending display change can be applied (especially DC#mWaitingForConfig)
        // in case shell hasn't called WindowOrganizerController#startTransition yet.
        if (mState < STATE_STARTED && this == mController.getCollectingTransition()) {
            applyDisplayChangeIfNeeded(new ArraySet<>());
        }
    }

    /**
     * Represents a condition that must be met before an associated transition can be considered