Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8dc7601 authored by George Mount's avatar George Mount
Browse files

Fix for ScrollView absorbing fling stretch

Bug: 288270962

When a fling was absorbed, it wasn't releasing the absorbed
stretch. This CL fixes that.

Test: new tests
Change-Id: Id328cb63911eed1644ed2d5e0ee6f2cdc5d4cce8
parent 46354c7d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1550,6 +1550,7 @@ public class ScrollView extends FrameLayout {
            float deltaDistance = -unconsumed * FLING_DESTRETCH_FACTOR / size;
            int consumed = Math.round(-size / FLING_DESTRETCH_FACTOR
                    * mEdgeGlowTop.onPullDistance(deltaDistance, 0.5f));
            mEdgeGlowTop.onRelease();
            if (consumed != unconsumed) {
                mEdgeGlowTop.finish();
            }
@@ -1560,6 +1561,7 @@ public class ScrollView extends FrameLayout {
            float deltaDistance = unconsumed * FLING_DESTRETCH_FACTOR / size;
            int consumed = Math.round(size / FLING_DESTRETCH_FACTOR
                    * mEdgeGlowBottom.onPullDistance(deltaDistance, 0.5f));
            mEdgeGlowBottom.onRelease();
            if (consumed != unconsumed) {
                mEdgeGlowBottom.finish();
            }