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

Commit 78c2f30b authored by Yunfan Chen's avatar Yunfan Chen
Browse files

Update status bar height in rotation params

The patch will update the layout params provided for different rotations
when the status bar height should have an update. With the patch,
runtime height update can be handled in time if the user rotate the
device after the runtime update.

Test: See reproduce steps in the bug.
Bug: 217312219
Change-Id: I002fc455b61b9aaead2ace8c9da15ed70cbbca4a
parent e21406e9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -274,6 +274,11 @@ public class StatusBarWindowController {
    private void applyHeight(State state) {
        mLpChanged.height =
                state.mIsLaunchAnimationRunning ? ViewGroup.LayoutParams.MATCH_PARENT : mBarHeight;
        for (int rot = Surface.ROTATION_0; rot <= Surface.ROTATION_270; rot++) {
            mLpChanged.paramsForRotation[rot].height =
                    state.mIsLaunchAnimationRunning ? ViewGroup.LayoutParams.MATCH_PARENT :
                    SystemBarUtils.getStatusBarHeightForRotation(mContext, rot);
        }
    }

    private void apply(State state) {