OSDN Git Service

Clipping the last notification if it's in the shelf
authorSelim Cinek <cinek@google.com>
Thu, 20 Jul 2017 17:47:48 +0000 (10:47 -0700)
committerSelim Cinek <cinek@google.com>
Thu, 20 Jul 2017 17:49:55 +0000 (10:49 -0700)
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

packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java

index e5f68ad..1889806 100644 (file)
@@ -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;