summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowManagerPolicy.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-02-22 15:05:25 -0800
committerDianne Hackborn <hackbod@google.com>2013-02-22 19:14:37 -0800
commitc4aad01cbbb69c916ef323693e1fd0560b0eccba (patch)
tree20f636eb690f976e9f83ec0a23e6ac991776b08b /core/java/android/view/WindowManagerPolicy.java
parentfb6806570911851fb8cbaaf5bdf275a89f3c3ef4 (diff)
Formalize overscan metrics.
The window manager now maintains and reports a new formal "overscan insets" for each window, much like the existing content and visible insets. This is used to correctly position the various UI elements in the various combination of layout options. In particular, this allows us to have an activity that is using fitSystemWindows to have the content of its UI extend out to the visible content part of the screen while still positioning its fixed UI elements inside the standard content rect (and the entire window extending all the way into the overscan area to fill the screen as desired). Okay, maybe that is not written so clearly. Well, it made my head hurt too, so suffer! The key thing is that windows now need to know about three rectangles: the overall rectangle of the window, the rectangle inside of the overscan area, and the rectangle inside of the content area. The FLAG_LAYOUT_IN_OVERSCAN option controls whether the second rectangle is pushed out to fill the entire overscan area. Also did some improvements to debug dumping in the window manager. Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
-rw-r--r--core/java/android/view/WindowManagerPolicy.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 60779ceb7fd9..c0044b662b28 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -154,6 +154,8 @@ public interface WindowManagerPolicy {
* @param displayFrame The frame of the overall display in which this
* window can appear, used for constraining the overall dimensions
* of the window.
+ * @param overlayFrame The frame within the display that is inside
+ * of the overlay region.
* @param contentFrame The frame within the display in which we would
* like active content to appear. This will cause windows behind to
* be resized to match the given content frame.
@@ -165,7 +167,7 @@ public interface WindowManagerPolicy {
* are visible.
*/
public void computeFrameLw(Rect parentFrame, Rect displayFrame,
- Rect contentFrame, Rect visibleFrame);
+ Rect overlayFrame, Rect contentFrame, Rect visibleFrame);
/**
* Retrieve the current frame of the window that has been assigned by
@@ -193,6 +195,15 @@ public interface WindowManagerPolicy {
public Rect getDisplayFrameLw();
/**
+ * Retrieve the frame of the area inside the overscan region of the
+ * display that this window was last laid out in. Must be called with the
+ * window manager lock held.
+ *
+ * @return Rect The rectangle holding the display overscan frame.
+ */
+ public Rect getOverscanFrameLw();
+
+ /**
* Retrieve the frame of the content area that this window was last
* laid out in. This is the area in which the content of the window
* should be placed. It will be smaller than the display frame to