From c519dcf1fb63f41acf8967ec876ae3975e55a1e7 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 22 Nov 2016 13:45:39 -0800 Subject: [PATCH] Fixed the backgroundclipping with the clipbottom amount The clipping was applied after the minimizing to the height, but it should have been applied before. Change-Id: I80140e91dd08505feb8fd2256fb6ff4c7e31a139 Test: Add group, expand it, observe correct clipping of the background on the bottom Bug: 32437839 --- .../statusbar/stack/NotificationStackScrollLayout.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index e8e3adb31bf7d..10d995ccadb52 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -2106,7 +2106,7 @@ public class NotificationStackScrollLayout extends ViewGroup finalTranslationY = (int) ViewState.getFinalTranslationY(lastView); } int finalHeight = ExpandableViewState.getFinalActualHeight(lastView); - int finalBottom = finalTranslationY + finalHeight; + int finalBottom = finalTranslationY + finalHeight - lastView.getClipBottomAmount(); finalBottom = Math.min(finalBottom, getHeight()); if (mAnimateNextBackgroundBottom || mBottomAnimator == null && mCurrentBounds.bottom == finalBottom @@ -2114,10 +2114,10 @@ public class NotificationStackScrollLayout extends ViewGroup // we're ending up at the same location as we are now, lets just skip the animation bottom = finalBottom; } else { - bottom = (int) (lastView.getTranslationY() + lastView.getActualHeight()); + bottom = (int) (lastView.getTranslationY() + lastView.getActualHeight() + - lastView.getClipBottomAmount()); bottom = Math.min(bottom, getHeight()); } - bottom -= lastView.getClipBottomAmount(); } else { top = mTopPadding; bottom = top;