summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit
diff options
context:
space:
mode:
authorHuahui Wu <hwu@google.com>2011-03-14 14:43:46 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-14 14:43:46 -0700
commitb71020ef4018195a21d2538ea3767b901610daf4 (patch)
tree3ffbc3d07115f493ccb8d72d47dcee98e499d7ce /core/java/android/webkit
parent462012db70fb73431bb25909d73e45fea9fc5911 (diff)
parent2d3ef37ae6ce91c759e57dda7f16d148fdeee35a (diff)
downloadframeworks_base-b71020ef4018195a21d2538ea3767b901610daf4.zip
frameworks_base-b71020ef4018195a21d2538ea3767b901610daf4.tar.gz
frameworks_base-b71020ef4018195a21d2538ea3767b901610daf4.tar.bz2
Merge "b/3392594 keep the remain touch points when one is ended." into honeycomb-mr1
Diffstat (limited to 'core/java/android/webkit')
-rw-r--r--core/java/android/webkit/WebView.java4
-rw-r--r--core/java/android/webkit/WebViewCore.java5
2 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 8ef745b..4aa1f5e 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -5964,6 +5964,10 @@ public class WebView extends AbsoluteLayout
int y = viewToContentY((int) ev.getY(c) + mScrollY);
ted.mPoints[c] = new Point(x, y);
}
+ if (ted.mAction == MotionEvent.ACTION_POINTER_DOWN
+ || ted.mAction == MotionEvent.ACTION_POINTER_UP) {
+ ted.mActionIndex = ev.getActionIndex();
+ }
ted.mMetaState = ev.getMetaState();
ted.mReprocess = true;
ted.mMotionEvent = MotionEvent.obtain(ev);
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 979eb2b..bed77ef 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -572,7 +572,7 @@ final class WebViewCore {
int framePtr, int nodePtr, int x, int y);
private native boolean nativeHandleTouchEvent(int action, int[] idArray,
- int[] xArray, int[] yArray, int count, int metaState);
+ int[] xArray, int[] yArray, int count, int actionIndex, int metaState);
private native void nativeUpdateFrameCache();
@@ -829,6 +829,7 @@ final class WebViewCore {
int mAction;
int[] mIds; // Ids of the touch points
Point[] mPoints;
+ int mActionIndex; // Associated pointer index for ACTION_POINTER_DOWN/UP
int mMetaState;
boolean mReprocess;
MotionEvent mMotionEvent;
@@ -1344,7 +1345,7 @@ final class WebViewCore {
ted.mNativeLayerRect);
}
ted.mNativeResult = nativeHandleTouchEvent(ted.mAction, ted.mIds,
- xArray, yArray, count, ted.mMetaState);
+ xArray, yArray, count, ted.mActionIndex, ted.mMetaState);
Message.obtain(
mWebView.mPrivateHandler,
WebView.PREVENT_TOUCH_ID,