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

Commit de368ff1 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Change window manager to use fixed size for the status bar.

Unlike the nav bar, it only uses a fixed size for determining
how to layout elements around it; it lets the status bar window
itself be whatever size it wants.

Change-Id: Id04278981ab38915280a47368fccc7ec14bb97ec
parent 50a92678
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2245,12 +2245,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            vf.right = mStableRight;
            vf.bottom = mStableBottom;

            // Let the status bar determine its size.
            mStatusBar.computeFrameLw(pf, df, vf, vf);
            final Rect r = mStatusBar.getFrameLw();

            // Compute the stable dimensions whether or not the status bar is hidden.
            if (mDockTop == r.top) mStableTop = r.bottom;
            else if (mDockBottom == r.bottom) mStableBottom = r.top;
            // For layout, the status bar is always at the top with our fixed height.
            mStableTop = mUnrestrictedScreenTop + mStatusBarHeight;

            // If the status bar is hidden, we don't want to cause
            // windows behind it to scroll.
@@ -2258,8 +2257,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                // Status bar may go away, so the screen area it occupies
                // is available to apps but just covering them when the
                // status bar is visible.
                if (mDockTop == r.top) mDockTop = r.bottom;
                else if (mDockBottom == r.bottom) mDockBottom = r.top;
                mDockTop = mUnrestrictedScreenTop + mStatusBarHeight;
                
                mContentTop = mCurTop = mDockTop;
                mContentBottom = mCurBottom = mDockBottom;