Reduced overexpansion when expanding the panel
Bug: 14486987
Change-Id: Ic1546e1661e3afe842b044abf636421d2620bddd
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 dce5a30..365ee57 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -48,6 +48,8 @@
ExpandableView.OnHeightChangedListener, ObservableScrollView.Listener,
View.OnClickListener, KeyguardPageSwipeHelper.Callback {
+ private static float EXPANSION_RUBBER_BAND_EXTRA_FACTOR = 0.4f;
+
private KeyguardPageSwipeHelper mPageSwiper;
PhoneStatusBar mStatusBar;
private StatusBarHeaderView mHeader;
@@ -743,8 +745,11 @@
@Override
protected void onOverExpansionChanged(float overExpansion) {
float currentOverScroll = mNotificationStackScroller.getCurrentOverScrolledPixels(true);
- mNotificationStackScroller.setOverScrolledPixels(currentOverScroll + overExpansion
- - mOverExpansion, true /* onTop */, false /* animate */);
+ float expansionChange = overExpansion - mOverExpansion;
+ expansionChange *= EXPANSION_RUBBER_BAND_EXTRA_FACTOR;
+ mNotificationStackScroller.setOverScrolledPixels(currentOverScroll + expansionChange,
+ true /* onTop */,
+ false /* animate */);
super.onOverExpansionChanged(overExpansion);
}