am 6fd88022: Merge "Fix jump in two-finger expand motion with no notifications" into lmp-mr1-dev

* commit '6fd88022c286730b6f17917dff2d9dd2d74bbfee':
  Fix jump in two-finger expand motion with no notifications
This commit is contained in:
Jorim Jaggi
2014-11-04 16:58:23 +00:00
committed by Android Git Automerger
2 changed files with 14 additions and 0 deletions

View File

@@ -1329,6 +1329,16 @@ public class NotificationPanelView extends PanelView implements
float notificationHeight = mNotificationStackScroller.getHeight()
- mNotificationStackScroller.getEmptyBottomMargin()
- mNotificationStackScroller.getTopPadding();
// When only empty shade view is visible in QS collapsed state, simulate that we would have
// it in expanded QS state as well so we don't run into troubles when fading the view in/out
// and expanding/collapsing the whole panel from/to quick settings.
if (mNotificationStackScroller.getNotGoneChildCount() == 0
&& mShadeEmpty) {
notificationHeight = mNotificationStackScroller.getEmptyShadeViewHeight()
+ mNotificationStackScroller.getBottomStackPeekSize()
+ mNotificationStackScroller.getCollapseSecondCardPadding();
}
float totalHeight = Math.max(
mQsMaxExpansionHeight + mNotificationStackScroller.getNotificationTopPadding(),
mClockPositionResult.stackScrollerPadding - mTopPaddingAdjustment)

View File

@@ -2272,6 +2272,10 @@ public class NotificationStackScrollLayout extends ViewGroup
return height;
}
public int getEmptyShadeViewHeight() {
return mEmptyShadeView.getHeight();
}
public float getBottomMostNotificationBottom() {
final int count = getChildCount();
float max = 0;