summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/WindowInsets.java
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2014-06-12 14:51:10 -0700
committerAdam Powell <adamp@google.com>2014-06-12 14:53:10 -0700
commit720924b6a9770f03355999102a11d98c5954407c (patch)
tree44197e6e6b17c77515504c14078dcc8286217a89 /core/java/android/view/WindowInsets.java
parent0c377a902490239b310cbdcd1e6aad504a0e8845 (diff)
downloadframeworks_base-720924b6a9770f03355999102a11d98c5954407c.zip
frameworks_base-720924b6a9770f03355999102a11d98c5954407c.tar.gz
frameworks_base-720924b6a9770f03355999102a11d98c5954407c.tar.bz2
Fix incorrect dispatch of empty WindowInsets from ActionBarOverlayLayout
Fix a bug where ActionBarOverlayLayout was using a private constructor of WindowInsets to return empty insets that should have been marked fully consumed. This caused dispatch to further child views not to stop appropriately, corrupting application layout in some cases. Bug 15588587 Change-Id: I97fcefa4755addf2385a7e7b0ffbf6d3e91adc5c
Diffstat (limited to 'core/java/android/view/WindowInsets.java')
-rw-r--r--core/java/android/view/WindowInsets.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index 3a1e826..9b75595 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -46,7 +46,13 @@ public final class WindowInsets {
* since it would allow them to inadvertently consume unknown insets by returning it.
* @hide
*/
- public static final WindowInsets EMPTY = new WindowInsets(EMPTY_RECT, EMPTY_RECT);
+ public static final WindowInsets CONSUMED;
+
+ static {
+ CONSUMED = new WindowInsets(EMPTY_RECT, EMPTY_RECT);
+ CONSUMED.mSystemWindowInsetsConsumed = true;
+ CONSUMED.mWindowDecorInsetsConsumed = true;
+ }
/** @hide */
public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets) {