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

Commit 560ba6e1 authored by Mindy Pereira's avatar Mindy Pereira Committed by Android Git Automerger
Browse files

am 08c09b0f: Merge "DO NOT MERGE. Only 1 edge glow should be growing at a time." into gingerbread

Merge commit '08c09b0f' into gingerbread-plus-aosp

* commit '08c09b0f':
  DO NOT MERGE. Only 1 edge glow should be growing at a time.
parents dafad06e 08c09b0f
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -2950,16 +2950,28 @@ public class WebView extends AbsoluteLayout
                    if (rangeY > 0 || getOverscrollMode() == OVERSCROLL_ALWAYS) {
                        if (y < 0 && oldY >= 0) {
                            mEdgeGlowTop.onAbsorb((int) mScroller.getCurrVelocity());
                            if (!mEdgeGlowBottom.isFinished()) {
                                mEdgeGlowBottom.onRelease();
                            }
                        } else if (y > rangeY && oldY <= rangeY) {
                            mEdgeGlowBottom.onAbsorb((int) mScroller.getCurrVelocity());
                            if (!mEdgeGlowTop.isFinished()) {
                                mEdgeGlowTop.onRelease();
                            }
                        }
                    }

                    if (rangeX > 0) {
                        if (x < 0 && oldX >= 0) {
                            mEdgeGlowLeft.onAbsorb((int) mScroller.getCurrVelocity());
                            if (!mEdgeGlowRight.isFinished()) {
                                mEdgeGlowRight.onRelease();
                            }
                        } else if (x > rangeX && oldX <= rangeX) {
                            mEdgeGlowRight.onAbsorb((int) mScroller.getCurrVelocity());
                            if (!mEdgeGlowLeft.isFinished()) {
                                mEdgeGlowLeft.onRelease();
                            }
                        }
                    }
                }
@@ -5558,8 +5570,14 @@ public class WebView extends AbsoluteLayout
                    final int pulledToX = oldX + deltaX;
                    if (pulledToX < 0) {
                        mEdgeGlowLeft.onPull((float) deltaX / getWidth());
                        if (!mEdgeGlowRight.isFinished()) {
                            mEdgeGlowRight.onRelease();
                        }
                    } else if (pulledToX > rangeX) {
                        mEdgeGlowRight.onPull((float) deltaX / getWidth());
                        if (!mEdgeGlowLeft.isFinished()) {
                            mEdgeGlowLeft.onRelease();
                        }
                    }
                }

@@ -5567,8 +5585,14 @@ public class WebView extends AbsoluteLayout
                    final int pulledToY = oldY + deltaY;
                    if (pulledToY < 0) {
                        mEdgeGlowTop.onPull((float) deltaY / getHeight());
                        if (!mEdgeGlowBottom.isFinished()) {
                            mEdgeGlowBottom.onRelease();
                        }
                    } else if (pulledToY > rangeY) {
                        mEdgeGlowBottom.onPull((float) deltaY / getHeight());
                        if (!mEdgeGlowTop.isFinished()) {
                            mEdgeGlowTop.onRelease();
                        }
                    }
                }
            }