summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-07-07 18:05:01 -0400
committerJoe Onorato <joeo@android.com>2010-07-07 18:33:14 -0400
commit34bcebca707187393263183aa4dab32728763f2f (patch)
treeeee15dd0ba3a1c30d6241a3e294738c088f81fed
parent52c1dc2fd99eabed1914e390143d3d74799e6366 (diff)
downloadframeworks_base-34bcebca707187393263183aa4dab32728763f2f.zip
frameworks_base-34bcebca707187393263183aa4dab32728763f2f.tar.gz
frameworks_base-34bcebca707187393263183aa4dab32728763f2f.tar.bz2
Let the window manager place the rest of the windows on screen when the status bar is at the bottom.
Change-Id: I29c43beee047bb99695a34e6b202ff3f8400c8c2
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java15
-rw-r--r--services/java/com/android/server/WindowManagerService.java5
2 files changed, 16 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index a01e25b..43bd26d 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1254,10 +1254,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (mStatusBar.isVisibleLw()) {
// If the status bar is hidden, we don't want to cause
// windows behind it to scroll.
- mDockTop = mContentTop = mCurTop = mStatusBar.getFrameLw().bottom;
- if (DEBUG_LAYOUT) Log.v(TAG, "Status bar: mDockBottom="
- + mDockBottom + " mContentBottom="
- + mContentBottom + " mCurBottom=" + mCurBottom);
+ final Rect r = mStatusBar.getFrameLw();
+ if (mDockTop == r.top) mDockTop = r.bottom;
+ else if (mDockBottom == r.bottom) mDockBottom = r.top;
+ mContentTop = mCurTop = mDockTop;
+ mContentBottom = mCurBottom = mDockBottom;
+ if (DEBUG_LAYOUT) Log.v(TAG, "Status bar: mDockTop=" + mDockTop
+ + " mContentTop=" + mContentTop
+ + " mCurTop=" + mCurTop
+ + " mDockBottom=" + mDockBottom
+ + " mContentBottom=" + mContentBottom
+ + " mCurBottom=" + mCurBottom);
}
}
}
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index d08cb0d..580eea4 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -10184,6 +10184,11 @@ public class WindowManagerService extends IWindowManager.Stub
private final void performLayoutAndPlaceSurfacesLockedInner(
boolean recoveringMemory) {
+ if (mDisplay == null) {
+ Slog.i(TAG, "skipping performLayoutAndPlaceSurfacesLockedInner with no mDisplay");
+ return;
+ }
+
final long currentTime = SystemClock.uptimeMillis();
final int dw = mDisplay.getWidth();
final int dh = mDisplay.getHeight();