summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-10-02 12:41:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-02 12:41:22 +0000
commitdaccfc6f3ba9d14f3dd44e7abc07dc70de46a6cb (patch)
tree4fc2ecb476bbf7f6606bd37dbbcc9dca58156715
parent569604f96722f4871ee8e3d712c56f2bd32dec3f (diff)
parentaad1cfba0e65957840ba01fdf303e58f378d95d7 (diff)
am aad1cfba: am ef74a703: am d7317cd1: am bb8cc37e: Merge "Don\'t forget header momentum upon scroll events" into lmp-dev
* commit 'aad1cfba0e65957840ba01fdf303e58f378d95d7': Don't forget header momentum upon scroll events
-rw-r--r--src/com/android/dialer/widget/OverlappingPaneLayout.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/dialer/widget/OverlappingPaneLayout.java b/src/com/android/dialer/widget/OverlappingPaneLayout.java
index b81722942..ad18b1486 100644
--- a/src/com/android/dialer/widget/OverlappingPaneLayout.java
+++ b/src/com/android/dialer/widget/OverlappingPaneLayout.java
@@ -988,7 +988,7 @@ public class OverlappingPaneLayout extends ViewGroup {
if (DEBUG) {
Log.d(TAG, "onStopNestedScroll");
}
- if (mIsInNestedScroll) {
+ if (mIsInNestedScroll && !mIsInNestedFling) {
mDragHelper.stopNestedScroll(mSlideableView);
mInNestedPreScrollDownwards = false;
mInNestedPreScrollUpwards = false;
@@ -1024,7 +1024,8 @@ public class OverlappingPaneLayout extends ViewGroup {
}
}
- if (mDragHelper.getVelocityMagnitude() > 0
+ if (state == ViewDragHelper.STATE_IDLE
+ && mDragHelper.getVelocityMagnitude() > 0
&& (mDragHelper.getCurrentScrollY() == 0
|| mDragHelper.getCurrentScrollY() == mIntermediateOffset)
&& mIsInNestedFling) {
@@ -1099,6 +1100,7 @@ public class OverlappingPaneLayout extends ViewGroup {
public void onViewReleased(View releasedChild, float xvel, float yvel) {
if (DEBUG) {
Log.d(TAG, "onViewReleased: "
+ + " mIsInNestedFling=" + mIsInNestedFling
+ " unscrolled=" + mPanelSlideCallbacks.isScrollableChildUnscrolled()
+ ", mInNestedPreScrollDownwards = " + mInNestedPreScrollDownwards
+ ", mInNestedPreScrollUpwards = " + mInNestedPreScrollUpwards