summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2013-08-07 14:13:37 -0700
committerJeff Brown <jeffbrown@google.com>2013-08-07 14:33:50 -0700
commitef981a40aa63069dc115b216ce38d1dd939dc64c (patch)
tree05c8b9ea8de1ad4d797d397f30e00ab6e031a65a /policy/src
parent18ec40c44c936fd5146133ccc7446a4cd860b527 (diff)
downloadframeworks_base-ef981a40aa63069dc115b216ce38d1dd939dc64c.zip
frameworks_base-ef981a40aa63069dc115b216ce38d1dd939dc64c.tar.gz
frameworks_base-ef981a40aa63069dc115b216ce38d1dd939dc64c.tar.bz2
Fix propagation of display overscan information.
Fix several problems in the way that the overscan was plumbed in which could result in information not being delivered to applications. There was also a violation of certain invariants regarding the immutability of returned DisplayInfo objects. Bug: 10213771 Change-Id: I21184a14305e44278b5e81353bf95d511e8517fb
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index f83b017..ae7120f 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -995,8 +995,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void setInitialDisplaySize(Display display, int width, int height, int density) {
- if (display.getDisplayId() != Display.DEFAULT_DISPLAY) {
- throw new IllegalArgumentException("Can only set the default display");
+ // This method might be called before the policy has been fully initialized
+ // or for other displays we don't care about.
+ if (mContext == null || display.getDisplayId() != Display.DEFAULT_DISPLAY) {
+ return;
}
mDisplay = display;