am 51309c7a: Merge "Fix not being able to dismiss notifications with tap." into lmp-preview-dev

* commit '51309c7ad93b2cbbe8fec828a49542d1207c4aa5':
  Fix not being able to dismiss notifications with tap.
This commit is contained in:
Jorim Jaggi
2014-06-04 20:53:01 +00:00
committed by Android Git Automerger
2 changed files with 4 additions and 3 deletions

View File

@@ -437,7 +437,7 @@ public class ExpandHelper implements Gefingerpoken {
break;
}
mLastMotionY = ev.getRawY();
return true;
return mResizedView != null;
}
/**

View File

@@ -162,7 +162,7 @@ public abstract class PanelView extends FrameLayout {
if (mHeightAnimator != null) {
mHeightAnimator.cancel(); // end any outstanding animations
}
mTouchSlopExceeded = true;
mTouchSlopExceeded = (mHeightAnimator != null && !mHintAnimationRunning);
onTrackingStarted();
}
if (mExpandedHeight == 0) {
@@ -219,7 +219,8 @@ public abstract class PanelView extends FrameLayout {
case MotionEvent.ACTION_CANCEL:
mTrackingPointer = -1;
trackMovement(event);
if (mTracking && mTouchSlopExceeded) {
if ((mTracking && mTouchSlopExceeded)
|| event.getActionMasked() == MotionEvent.ACTION_CANCEL) {
float vel = getCurrentVelocity();
boolean expand = flingExpands(vel);
onTrackingStopped(expand);