Change fling behavior of PanelView.
Change-Id: Ie700be6b1ef48350601ce6bc7fe60579fddae098
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 19252c0..7e3bf68 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -150,7 +150,7 @@
mMoreCardNotificationAmount =
(float) getResources().getDimensionPixelSize(R.dimen.notification_summary_height) /
getResources().getDimensionPixelSize(R.dimen.notification_min_height);
- mFlingAnimationUtils = new FlingAnimationUtils(getContext());
+ mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.4f);
mStatusBarMinHeight = getResources().getDimensionPixelSize(
com.android.internal.R.dimen.status_bar_height);
}
@@ -618,16 +618,14 @@
@Override
protected int getMaxPanelHeight() {
- if (!isInSettings()) {
- int maxPanelHeight = super.getMaxPanelHeight();
- int notificationMarginBottom = mStackScrollerContainer.getPaddingBottom();
- int emptyBottomMargin = notificationMarginBottom
- + mNotificationStackScroller.getEmptyBottomMargin();
- int maxHeight = maxPanelHeight - emptyBottomMargin;
- maxHeight = Math.max(maxHeight, mStatusBarMinHeight);
- return maxHeight;
- }
- return super.getMaxPanelHeight();
+ // TODO: Figure out transition for collapsing when QS is open, adjust height here.
+ int maxPanelHeight = super.getMaxPanelHeight();
+ int emptyBottomMargin = mStackScrollerContainer.getHeight()
+ - mNotificationStackScroller.getHeight()
+ + mNotificationStackScroller.getEmptyBottomMargin();
+ int maxHeight = maxPanelHeight - emptyBottomMargin;
+ maxHeight = Math.max(maxHeight, mStatusBarMinHeight);
+ return maxHeight;
}
private boolean isInSettings() {
@@ -640,11 +638,6 @@
}
@Override
- protected int getDesiredMeasureHeight() {
- return mMaxPanelHeight;
- }
-
- @Override
protected void onExpandingStarted() {
super.onExpandingStarted();
mNotificationStackScroller.onExpansionStarted();