summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorMarc Capdevielle <marc.capdevielle@gmail.com>2010-02-05 19:28:23 +0100
committerMarc Capdevielle <marc.capdevielle@gmail.com>2010-02-05 19:28:23 +0100
commit8621cfa43fd12b5ad1376eb1a2454729ce9d9c7e (patch)
treedcde40e85df9636b32731ebd31410460be535d90 /test-runner
parent8ab11f87acf01b830ad0db46ec549406b33c39de (diff)
downloadframeworks_base-8621cfa43fd12b5ad1376eb1a2454729ce9d9c7e.zip
frameworks_base-8621cfa43fd12b5ad1376eb1a2454729ce9d9c7e.tar.gz
frameworks_base-8621cfa43fd12b5ad1376eb1a2454729ce9d9c7e.tar.bz2
Fix x coordinate of the ACTION_UP event in TouchUtils.drag() method
The ACTION_UP event was fired at the "fromX" position instead of being fired at the "toX" position which is the current value of local var "x". This bug had no real impact as the VelocityTracker always ignores the last MotionEvent when it received more than 3 events...
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/android/test/TouchUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-runner/android/test/TouchUtils.java b/test-runner/android/test/TouchUtils.java
index 962b2f9..69c6d2d 100644
--- a/test-runner/android/test/TouchUtils.java
+++ b/test-runner/android/test/TouchUtils.java
@@ -773,7 +773,7 @@ public class TouchUtils {
float xStep = (toX - fromX) / stepCount;
MotionEvent event = MotionEvent.obtain(downTime, eventTime,
- MotionEvent.ACTION_DOWN, fromX, y, 0);
+ MotionEvent.ACTION_DOWN, x, y, 0);
inst.sendPointerSync(event);
inst.waitForIdleSync();
@@ -787,7 +787,7 @@ public class TouchUtils {
}
eventTime = SystemClock.uptimeMillis();
- event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, fromX, y, 0);
+ event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0);
inst.sendPointerSync(event);
inst.waitForIdleSync();
}