From 98dd7f13085d1535b53bd22b235865f3f869ce35 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Tue, 14 Jun 2016 15:51:40 -0700 Subject: [PATCH] A11y: Fix notification bounds when top notification is scrolled Previously, scrolled notifications would collapse into a stack (the top stack). With the new design, that's no longer the case, so tall notifications can now be scrolled out so much that their translation becomes negative. Unfortunatly, getBoundsOnScreen then clips the bounds to the parent, which interferes with our adjustment to the bounds, so we first undo the clipping. Fixes: 29368064 Change-Id: I71da054ed1eb6d06868d56e18d0320f764ed86b3 --- .../src/com/android/systemui/statusbar/ExpandableView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java index 2c302ed1af4e6..a55a5e482dfc6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java @@ -305,6 +305,10 @@ public abstract class ExpandableView extends FrameLayout { @Override public void getBoundsOnScreen(Rect outRect, boolean clipToParent) { super.getBoundsOnScreen(outRect, clipToParent); + if (getTop() + getTranslationY() < 0) { + // We got clipped to the parent here - make sure we undo that. + outRect.top += getTop() + getTranslationY(); + } outRect.bottom = outRect.top + getActualHeight(); outRect.top += getClipTopAmount(); }