Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
development
Commits
d699ad18
Commit
d699ad18
authored
13 years ago
by
Xia Wang
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Download
Plain Diff
Merge "Remove the WaitEvent added in Tap and Drag." into jb-dev
parents
285ee4b3
5e20670c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java
...y/src/com/android/commands/monkey/MonkeySourceScript.java
+1
-4
No files found.
cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java
View file @
d699ad18
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment