Skip to content

Commit de368ff

Browse files
author
Dianne Hackborn
committed
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
1 parent 50a9267 commit de368ff

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,21 +2245,19 @@ public void beginLayoutLw(int displayWidth, int displayHeight, int displayRotati
22452245
vf.right = mStableRight;
22462246
vf.bottom = mStableBottom;
22472247

2248+
// Let the status bar determine its size.
22482249
mStatusBar.computeFrameLw(pf, df, vf, vf);
2249-
final Rect r = mStatusBar.getFrameLw();
22502250

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

22552254
// If the status bar is hidden, we don't want to cause
22562255
// windows behind it to scroll.
22572256
if (mStatusBar.isVisibleLw()) {
22582257
// Status bar may go away, so the screen area it occupies
22592258
// is available to apps but just covering them when the
22602259
// status bar is visible.
2261-
if (mDockTop == r.top) mDockTop = r.bottom;
2262-
else if (mDockBottom == r.bottom) mDockBottom = r.top;
2260+
mDockTop = mUnrestrictedScreenTop + mStatusBarHeight;
22632261

22642262
mContentTop = mCurTop = mDockTop;
22652263
mContentBottom = mCurBottom = mDockBottom;

0 commit comments

Comments
 (0)