diff options
| author | Xia Wang <xiaw@google.com> | 2012-05-18 17:04:02 -0700 |
|---|---|---|
| committer | Xia Wang <xiaw@google.com> | 2012-05-18 17:04:02 -0700 |
| commit | 5e20670c0b3484b9d067edd0bf0b4e158165815c (patch) | |
| tree | 84d007701ba6a613f07c998e74e995ca837020fb /cmds | |
| parent | f2bc2a024cbcf12500c598dc97f71cfcb0168007 (diff) | |
| download | android_development-5e20670c0b3484b9d067edd0bf0b4e158165815c.tar.gz android_development-5e20670c0b3484b9d067edd0bf0b4e158165815c.tar.bz2 android_development-5e20670c0b3484b9d067edd0bf0b4e158165815c.zip | |
Remove the WaitEvent added in Tap and Drag.
As the delay is added as WaitEvent, throttle time is applied after
the WaitEvent. This cause problem for Tap and Drag. The thorrle time
is then inserted between ACTION_DOWN and ACTION_UP, or ACTION_DOWN
and ACTION_MOVE. This broke the two actions.
Change-Id: I5a122d6cb3d99e38d9442c3de50e0360652c4baf
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java b/cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java index 05f29cf27..b2b9b4f8e 100644 --- a/cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java +++ b/cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java @@ -328,7 +328,7 @@ public class MonkeySourceScript implements MonkeyEventSource { try { float x = Float.parseFloat(args[0]); float y = Float.parseFloat(args[1]); - long tapDuration = 5; + long tapDuration = 0; if (args.length == 3) { tapDuration = Long.parseLong(args[2]); } @@ -396,7 +396,6 @@ public class MonkeySourceScript implements MonkeyEventSource { long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); - MonkeyWaitEvent wayPointDelay = new MonkeyWaitEvent(5); if (stepCount > 0) { float xStep = (xEnd - xStart) / stepCount; float yStep = (yEnd - yStart) / stepCount; @@ -407,7 +406,6 @@ public class MonkeySourceScript implements MonkeyEventSource { mQ.addLast(e); for (int i = 0; i < stepCount; ++i) { - mQ.addLast(wayPointDelay); x += xStep; y += yStep; eventTime = SystemClock.uptimeMillis(); @@ -416,7 +414,6 @@ public class MonkeySourceScript implements MonkeyEventSource { mQ.addLast(e); } - mQ.addLast(wayPointDelay); eventTime = SystemClock.uptimeMillis(); e = new MonkeyTouchEvent(MotionEvent.ACTION_UP).setDownTime(downTime) .setEventTime(eventTime).addPointer(0, x, y, 1, 5); |
