summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2014-06-06 18:06:04 +0200
committer Selim Cinek <cinek@google.com> 2014-06-06 18:06:04 +0200
commitaef92efb1032b4ad2628a45f494d0e03357960ac (patch)
tree5fc99d3a2884fabaceaf32f4ddbd5a99b444748f
parentadf2ea2bfda0bde4ef84725402d6b033dfa2b9f1 (diff)
When dragging down on the lockscreen, the lowest card could jump.
Bug: 15203895 Change-Id: I1a0a5a236490f12dba93700685be049d723b5339
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 4d862139b5e3..20caed8cc850 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -264,6 +264,13 @@ public class NotificationStackScrollLayout extends ViewGroup
: mPaddingBetweenElementsNormal;
mBottomStackSlowDownHeight = mStackScrollAlgorithm.getBottomStackSlowDownLength();
updateContentHeight();
+ notifyHeightChangeListener(null);
+ }
+
+ private void notifyHeightChangeListener(ExpandableView view) {
+ if (mOnHeightChangedListener != null) {
+ mOnHeightChangedListener.onHeightChanged(view);
+ }
}
@Override
@@ -402,9 +409,7 @@ public class NotificationStackScrollLayout extends ViewGroup
mNeedsAnimation = true;
}
requestChildrenUpdate();
- if (mOnHeightChangedListener != null) {
- mOnHeightChangedListener.onHeightChanged(null);
- }
+ notifyHeightChangeListener(null);
}
}
@@ -1725,9 +1730,7 @@ public class NotificationStackScrollLayout extends ViewGroup
public void onHeightChanged(ExpandableView view) {
updateContentHeight();
updateScrollPositionIfNecessary();
- if (mOnHeightChangedListener != null) {
- mOnHeightChangedListener.onHeightChanged(view);
- }
+ notifyHeightChangeListener(view);
requestChildrenUpdate();
}