Skip to content

Commit

Permalink
增大随机区域
Browse files Browse the repository at this point in the history
  • Loading branch information
kerwintangshuai committed Jan 2, 2018
1 parent cd1b1d7 commit 3f36218
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static void setScreenshotLocation(String screenshotLocation) {
*/
public static void longPress(double timeMilli, BufferedImage image) {
try {
int width = image.getWidth() / 2 + (int) (Math.random() * 100);
int height = image.getHeight() - 200 + (int) (Math.random() * 100);
int width = image.getWidth() / 3 + (int) (Math.random() * image.getWidth() / 3);
int height = image.getHeight() - 300 + (int) (Math.random() * 200);
Process process = Runtime.getRuntime()
.exec(adbPath + " shell input touchscreen swipe " + width + " " + height + " " + width + " " + height + " " + (int) timeMilli);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
Expand Down

0 comments on commit 3f36218

Please sign in to comment.