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

am: 729166fb44

* commit '729166fb448b8c2a650439931c69f27da3238d8b':
  Fixed a bug where QS could fling up even when collapsing
This commit is contained in:
Selim Cinek
2016-02-23 18:24:50 +00:00
committed by android-build-merger

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;