From 720924b6a9770f03355999102a11d98c5954407c Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Thu, 12 Jun 2014 14:51:10 -0700 Subject: 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 --- core/java/android/view/WindowInsets.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core/java/android') 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) { -- cgit v1.1