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

Commit 342bfbf9 authored by Huahui Wu's avatar Huahui Wu Committed by Android (Google) Code Review
Browse files

Merge "b/3340946 Fix NPE caused by null gesture detector." into honeycomb

parents 6014527c 8465cc9d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -5536,8 +5536,9 @@ public class WebView extends AbsoluteLayout
                            + "mPreventDefault = " + mPreventDefault
                            + " mDeferTouchProcess = " + mDeferTouchProcess
                            + " mTouchMode = " + mTouchMode);
                }
                } else {
                    mVelocityTracker.addMovement(ev);
                }
                if (mSelectingText && mSelectionStarted) {
                    if (DebugFlags.WEB_VIEW) {
                        Log.v(LOGTAG, "extend=" + contentX + "," + contentY);
@@ -5776,8 +5777,9 @@ public class WebView extends AbsoluteLayout
                                        + mPreventDefault
                                        + " mDeferTouchProcess = "
                                        + mDeferTouchProcess);
                            }
                            } else {
                                mVelocityTracker.addMovement(ev);
                            }
                            // set to MOTIONLESS_IGNORE so that it won't keep
                            // removing and sending message in
                            // drawCoreAndCursorRing()
@@ -5852,6 +5854,11 @@ public class WebView extends AbsoluteLayout

        final ScaleGestureDetector detector =
            mZoomManager.getMultiTouchGestureDetector();

        // A few apps use WebView but don't instantiate gesture detector.
        // We don't need to support multi touch for them.
        if (detector == null) return false;

        int action = ev.getAction();
        float x = ev.getX();
        float y = ev.getY();