Merge "Fixed a bug where QS could fling up even when collapsing" into nyc-dev

This commit is contained in:
Selim Cinek
2016-02-23 18:21:09 +00:00
committed by Android (Google) Code Review

View File

@@ -879,7 +879,11 @@ public class NotificationPanelView extends PanelView implements
mQsTracking = false;
mTrackingPointer = -1;
trackMovement(event);
flingQsWithCurrentVelocity(y, event.getActionMasked() == MotionEvent.ACTION_CANCEL);
float fraction = getQsExpansionFraction();
if (fraction != 0f || y >= mInitialTouchY) {
flingQsWithCurrentVelocity(y,
event.getActionMasked() == MotionEvent.ACTION_CANCEL);
}
if (mVelocityTracker != null) {
mVelocityTracker.recycle();
mVelocityTracker = null;