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

Commit 9f0a20ce authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Run surface placement at the end of display change" into 24D1-dev

parents f7d5fa09 366ed325
Loading
Loading
Loading
Loading
+19 −12
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@ public class DeferredDisplayUpdater implements DisplayUpdater {
                    mDisplayContent.mInitialDisplayHeight);
            final int fromRotation = mDisplayContent.getRotation();

            mDisplayContent.mAtmService.deferWindowLayout();
            try {
                onStartCollect.run();

                ProtoLog.d(WM_DEBUG_WINDOW_TRANSITIONS,
@@ -184,6 +186,11 @@ public class DeferredDisplayUpdater implements DisplayUpdater {
                    mDisplayContent.mTransitionController.requestStartTransition(transition,
                            /* startTask= */ null, /* remoteTransition= */ null, displayChange);
                }
            } finally {
                // Run surface placement after requestStartTransition, so shell side can receive
                // the transition request before handling task info changes.
                mDisplayContent.mAtmService.continueWindowLayout();
            }
        });
    }

+6 −1
Original line number Diff line number Diff line
@@ -6175,7 +6175,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
     * @param onDisplayChangeApplied callback that is called when the changes are applied
     */
    void requestDisplayUpdate(@NonNull Runnable onDisplayChangeApplied) {
        mAtmService.deferWindowLayout();
        try {
            mDisplayUpdater.updateDisplayInfo(onDisplayChangeApplied);
        } finally {
            mAtmService.continueWindowLayout();
        }
    }

    void onDisplayInfoUpdated(@NonNull DisplayInfo newDisplayInfo) {