From 3ff9fba2cdf6d52ca17777931732919ea0e7f3bd Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Thu, 20 Jul 2017 10:47:48 -0700 Subject: [PATCH] Clipping the last notification if it's in the shelf Before we were only clipping it to the bottom on the shelf, but if we're already fully in the shelf (and made visible again by another clause) then we still need to clip to the top. Test: manual, observe normal clipping for last item Change-Id: Ie1bc7afb78534bd89d771808eba8e02251d3a3cc Fixes: 63264213 --- .../src/com/android/systemui/statusbar/NotificationShelf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index e5f68ad60089d..1889806bf985e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -244,7 +244,7 @@ public class NotificationShelf extends ActivatableNotificationView implements boolean aboveShelf = ViewState.getFinalTranslationZ(row) > baseZHeight; boolean isLastChild = child == lastChild; float rowTranslationY = row.getTranslationY(); - if (isLastChild || aboveShelf || backgroundForceHidden) { + if ((isLastChild && !child.isInShelf()) || aboveShelf || backgroundForceHidden) { notificationClipEnd = shelfStart + getIntrinsicHeight(); } else { notificationClipEnd = shelfStart - mPaddingBetweenElements;