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

Commit a8f99519 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Reduce duplicated invocation of sendNewConfiguration" into main

parents 1bed4824 11452bf7
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -2030,12 +2030,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }
        // Update directly because the app which will change the orientation of display is ready.
        if (mDisplayRotation.updateOrientation(getOrientation(), false /* forceUpdate */)) {
            // Run rotation change on display thread. See Transition#shouldApplyOnDisplayThread().
            mWmService.mH.post(() -> {
                synchronized (mWmService.mGlobalLock) {
            // If a transition is collecting, let the transition apply the rotation change on
            // display thread. See Transition#shouldApplyOnDisplayThread().
            if (!mTransitionController.isCollecting(this)) {
                sendNewConfiguration();
            }
            });
            return;
        }
        if (mRemoteDisplayChangeController.isWaitingForRemoteDisplayChange()) {
+0 −1
Original line number Diff line number Diff line
@@ -1717,7 +1717,6 @@ public class DisplayContentTests extends WindowTestsBase {
        // The display should be rotated after the launch is finished.
        doReturn(false).when(app).isAnimating(anyInt(), anyInt());
        mDisplayContent.mAppTransition.notifyAppTransitionFinishedLocked(app.token);
        waitHandlerIdle(mWm.mH);
        mStatusBarWindow.finishSeamlessRotation(t);
        mNavBarWindow.finishSeamlessRotation(t);