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

Commit 1f2487e2 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Use the TaskFragment override screenLayout for fix rotation" into tm-qpr-dev

parents 9e2a134d 268e1abc
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -448,8 +448,14 @@ class WindowToken extends WindowContainer<WindowState> {
        if (mFixedRotationTransformState != null) {
            mFixedRotationTransformState.disassociate(this);
        }
        // TODO(b/233855302): Remove TaskFragment override if the DisplayContent uses the same
        //  bounds for screenLayout calculation.
        final Configuration overrideConfig = new Configuration(config);
        overrideConfig.screenLayout = TaskFragment.computeScreenLayoutOverride(
                overrideConfig.screenLayout, overrideConfig.screenWidthDp,
                overrideConfig.screenHeightDp);
        mFixedRotationTransformState = new FixedRotationTransformState(info, displayFrames,
                new Configuration(config), mDisplayContent.getRotation());
                overrideConfig, mDisplayContent.getRotation());
        mFixedRotationTransformState.mAssociatedTokens.add(this);
        mDisplayContent.getDisplayPolicy().simulateLayoutDisplay(displayFrames);
        onFixedRotationStatePrepared();