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

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

Report legacyStart for all displays legacyPending reported

We send pending for every display that *might* have a change
on it; however, once the WM transaction is done (transition
ready), some of those changes might be no-ops. Clients of
the legacy callbacks expect pending to be followed by start,
so this change will report start for every display that
set pending even if it was ultimately no-op.

Bug: 356987205
Test: go to -1, then press back.
Flag: EXEMPT bugfix
Change-Id: I1adcb47d6a394a9b7fff3330d651b018e7910692
parent 2212fbb5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1908,7 +1908,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        mCleanupTransaction = mController.mAtm.mWindowManager.mTransactionFactory.get();
        buildCleanupTransaction(mCleanupTransaction, info);
        if (mController.getTransitionPlayer() != null && mIsPlayerEnabled) {
            mController.dispatchLegacyAppTransitionStarting(info, mStatusBarTransitionDelay);
            mController.dispatchLegacyAppTransitionStarting(participantDisplays,
                    mStatusBarTransitionDelay);
            try {
                ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
                        "Calling onTransitionReady: %s", info);
+4 −3
Original line number Diff line number Diff line
@@ -1354,12 +1354,13 @@ class TransitionController {
        }
    }

    void dispatchLegacyAppTransitionStarting(TransitionInfo info, long statusBarTransitionDelay) {
    void dispatchLegacyAppTransitionStarting(DisplayContent[] participantDisplays,
            long statusBarTransitionDelay) {
        final long now = SystemClock.uptimeMillis();
        for (int i = 0; i < mLegacyListeners.size(); ++i) {
            final WindowManagerInternal.AppTransitionListener listener = mLegacyListeners.get(i);
            for (int j = 0; j < info.getRootCount(); ++j) {
                final int displayId = info.getRoot(j).getDisplayId();
            for (int j = 0; j < participantDisplays.length; ++j) {
                final int displayId = participantDisplays[j].mDisplayId;
                if (shouldDispatchLegacyListener(listener, displayId)) {
                    listener.onAppTransitionStartingLocked(
                            now + statusBarTransitionDelay,