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

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

Merge "Run app switch display change from on display thread" into main

parents b7345e54 6642c65f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2003,7 +2003,12 @@ 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) {
                    sendNewConfiguration();
                }
            });
            return;
        }
        if (mRemoteDisplayChangeController.isWaitingForRemoteDisplayChange()) {
+1 −0
Original line number Diff line number Diff line
@@ -1717,6 +1717,7 @@ 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);