When collapsing directly from the expanded quicksettings
the shade would jump when there were no notifications.
Test: manual
Merged-In: I9a85cd57e2f96970ad4ea78a8c679145b58d563a
Change-Id: I9a85cd57e2f96970ad4ea78a8c679145b58d563a
Fixes:
35996906
*/
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) {
appearPosition += mShelf.getIntrinsicHeight();
}
} else {