remove isClick parameter in browser touch event handler
isClick is always set to true by the callers, so remove
it and simplify the code
(http://b/issue?id=1666780; see also change in external/webkit)
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 424e151..5b67b74 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -4404,7 +4404,7 @@
View v = mTextEntry;
int x = viewToContent((v.getLeft() + v.getRight()) >> 1);
int y = viewToContent((v.getTop() + v.getBottom()) >> 1);
- nativeMotionUp(x, y, mNavSlop, true);
+ nativeMotionUp(x, y, mNavSlop);
}
}
@@ -4416,7 +4416,7 @@
// mLastTouchX and mLastTouchY are the point in the current viewport
int contentX = viewToContent((int) mLastTouchX + mScrollX);
int contentY = viewToContent((int) mLastTouchY + mScrollY);
- if (nativeMotionUp(contentX, contentY, mNavSlop, true)) {
+ if (nativeMotionUp(contentX, contentY, mNavSlop)) {
if (mLogEvent) {
Checkin.updateStats(mContext.getContentResolver(),
Checkin.Stats.Tag.BROWSER_SNAP_CENTER, 1, 0.0);
@@ -5172,13 +5172,12 @@
// called by JNI
private void sendMotionUp(int touchGeneration, int buildGeneration,
- int frame, int node, int x, int y, int size, boolean isClick,
+ int frame, int node, int x, int y, int size,
boolean retry) {
WebViewCore.TouchUpData touchUpData = new WebViewCore.TouchUpData();
touchUpData.mMoveGeneration = touchGeneration;
touchUpData.mBuildGeneration = buildGeneration;
touchUpData.mSize = size;
- touchUpData.mIsClick = isClick;
touchUpData.mRetry = retry;
mFocusData.mFrame = touchUpData.mFrame = frame;
mFocusData.mNode = touchUpData.mNode = node;
@@ -5315,7 +5314,7 @@
private native void nativeInstrumentReport();
private native void nativeMarkNodeInvalid(int node);
// return true if the page has been scrolled
- private native boolean nativeMotionUp(int x, int y, int slop, boolean isClick);
+ private native boolean nativeMotionUp(int x, int y, int slop);
// returns false if it handled the key
private native boolean nativeMoveFocus(int keyCode, int count,
boolean noScroll);
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index c1bab3a..1c83264 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -384,7 +384,7 @@
private native void nativeTouchUp(int touchGeneration,
int buildGeneration, int framePtr, int nodePtr, int x, int y,
- int size, boolean isClick, boolean retry);
+ int size, boolean retry);
private native boolean nativeHandleTouchEvent(int action, int x, int y);
@@ -540,7 +540,6 @@
int mX;
int mY;
int mSize;
- boolean mIsClick;
boolean mRetry;
}
@@ -906,7 +905,7 @@
touchUpData.mBuildGeneration,
touchUpData.mFrame, touchUpData.mNode,
touchUpData.mX, touchUpData.mY,
- touchUpData.mSize, touchUpData.mIsClick,
+ touchUpData.mSize,
touchUpData.mRetry);
break;