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 61fed2dfdcfbb..d176b66caaec6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -815,7 +815,8 @@ public class NotificationStackScrollLayout extends ViewGroup */ private float getAppearEndPosition() { int appearPosition; - if (mEmptyShadeView.getVisibility() == GONE) { + int notGoneChildCount = getNotGoneChildCount(); + if (mEmptyShadeView.getVisibility() == GONE && notGoneChildCount != 0) { int minNotificationsForShelf = 1; if (mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()) { appearPosition = mHeadsUpManager.getTopHeadsUpPinnedHeight(); @@ -823,7 +824,7 @@ public class NotificationStackScrollLayout extends ViewGroup } else { appearPosition = 0; } - if (getNotGoneChildCount() >= minNotificationsForShelf) { + if (notGoneChildCount >= minNotificationsForShelf) { appearPosition += mShelf.getIntrinsicHeight(); } } else {