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

Commit 63ef8279 authored by Roman Birg's avatar Roman Birg Committed by Dan Pasanen
Browse files

SystemUI: properly adjust statusbar height on rotate as necessary



Some devices may want a different statusbar height between landscape and
portrait.

For this to work, we need to read the statusbar height from the internal
framework where the statusbar height overlay happens.

Change-Id: I34b5549fee5e3fe7c4810dfecb66087e28b01d74
Signed-off-by: default avatarRoman Birg <romanbirg@gmail.com>
parent 7dbe4022
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -210,8 +210,8 @@ public class PhoneStatusBarView extends PanelBar {

    public void onDensityOrFontScaleChanged() {
        ViewGroup.LayoutParams layoutParams = getLayoutParams();
        layoutParams.height = getResources().getDimensionPixelSize(
                R.dimen.status_bar_height);
        layoutParams.height = mContext.getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.status_bar_height);
        setLayoutParams(layoutParams);
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -4203,6 +4203,7 @@ public class StatusBar extends SystemUI implements DemoMode,
                com.android.internal.R.dimen.status_bar_height);
        if (mStatusBarWindowManager != null && mNaturalBarHeight != oldBarHeight) {
            mStatusBarWindowManager.setBarHeight(mNaturalBarHeight);
            mStatusBarView.onDensityOrFontScaleChanged();
        }
        mMaxAllowedKeyguardNotifications = res.getInteger(
                R.integer.keyguard_max_notification_count);