Merge "Fix scrolling of QS panel when no notification is present."

This commit is contained in:
Selim Cinek
2015-09-12 01:10:10 +00:00
committed by Gerrit Code Review

View File

@@ -1925,6 +1925,7 @@ public class NotificationStackScrollLayout extends ViewGroup
case MotionEvent.ACTION_DOWN: {
final int y = (int) ev.getY();
mScrolledToTopOnFirstDown = isScrolledToTop();
if (getChildAtPosition(ev.getX(), y) == null) {
setIsBeingDragged(false);
recycleVelocityTracker();
@@ -1938,7 +1939,6 @@ public class NotificationStackScrollLayout extends ViewGroup
mLastMotionY = y;
mDownX = (int) ev.getX();
mActivePointerId = ev.getPointerId(0);
mScrolledToTopOnFirstDown = isScrolledToTop();
initOrResetVelocityTracker();
mVelocityTracker.addMovement(ev);