*/
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();
} else {
appearPosition = 0;
}
- if (getNotGoneChildCount() >= minNotificationsForShelf
+ if (notGoneChildCount >= minNotificationsForShelf
&& mShelf.getVisibility() != GONE) {
appearPosition += mShelf.getIntrinsicHeight();
}