Don't reset the velocity when flinging down just because of falsing

The velocity was reset even if the direction was correct.

Test: collapse on the lockscreen and then fling down, observe no jitter
Bug: 32437839
Change-Id: I92454a1bb3d8156c8c3c537b266d061b16c82c7b
This commit is contained in:
Selim Cinek
2016-12-07 12:16:45 -08:00
parent 727903ce56
commit 61190fb7e7

View File

@@ -685,7 +685,7 @@ public abstract class PanelView extends FrameLayout {
mOverExpandedBeforeFling = getOverExpansionAmount() > 0f;
ValueAnimator animator = createHeightAnimator(target);
if (expand) {
if (expandBecauseOfFalsing) {
if (expandBecauseOfFalsing && vel < 0) {
vel = 0;
}
mFlingAnimationUtils.apply(animator, mExpandedHeight, target, vel, getHeight());