summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowManagerPolicy.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-04-28 19:52:37 -0700
committerDianne Hackborn <hackbod@google.com>2012-04-30 12:11:43 -0700
commit5c58de3a523a384c47b0b1e0f5dd9728a74cd9f7 (patch)
tree1f765389f4c5153bf09f2cacb9fe87f74169dc67 /core/java/android/view/WindowManagerPolicy.java
parent3ea8761974a530218a246dc73583c8820b12bf0b (diff)
Add system insets to windows.
This will be used to determine which parts of a window a completely hidden by system UI elements (status bar, nav bar, system bar) so that they can be clipped out from rendering. Change-Id: I2c6c6ac67dbdfeed82d2c089ef806fb483165bd9
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
-rw-r--r--core/java/android/view/WindowManagerPolicy.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 27baaea870f8..94762b903e08 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -140,6 +140,10 @@ 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 systemFrame The frame within the display that any system
+ * elements are currently covering. These indicate which parts of
+ * the window should be considered completely obscured by the screen
+ * decorations.
* @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.
@@ -151,7 +155,7 @@ public interface WindowManagerPolicy {
* are visible.
*/
public void computeFrameLw(Rect parentFrame, Rect displayFrame,
- Rect contentFrame, Rect visibleFrame);
+ Rect systemFrame, Rect contentFrame, Rect visibleFrame);
/**
* Retrieve the current frame of the window that has been assigned by
@@ -173,12 +177,20 @@ public interface WindowManagerPolicy {
* Retrieve the frame 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 frame.
*/
public Rect getDisplayFrameLw();
/**
+ * Retrieve the frame of the system elements that last covered the window.
+ * Must be called with the window manager lock held.
+ *
+ * @return Rect The rectangle holding the system frame.
+ */
+ public Rect getSystemFrameLw();
+
+ /**
* 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
@@ -298,6 +310,12 @@ public interface WindowManagerPolicy {
boolean isDisplayedLw();
/**
+ * Return true if this window (or a window it is attached to, but not
+ * considering its app token) is currently animating.
+ */
+ public boolean isAnimatingLw();
+
+ /**
* Is this window considered to be gone for purposes of layout?
*/
boolean isGoneForLayoutLw();
@@ -305,8 +323,6 @@ public interface WindowManagerPolicy {
/**
* Returns true if this window has been shown on screen at some time in
* the past. Must be called with the window manager lock held.
- *
- * @return boolean
*/
public boolean hasDrawnLw();