Skip to content

Commit

Permalink
fix: monkey fastjson bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Nov 3, 2022
1 parent 0ba90f2 commit a104ad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<dependency>
<groupId>io.github.soniccloudorg</groupId>
<artifactId>sonic-vision-core</artifactId>
<version>1.0.5-${platform}</version>
<version>1.0.6-${platform}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ public void runMonkey(HandleDes handleDes, JSONObject content, List<JSONObject>
handleDes.setE(new Exception("未安装应用"));
return;
}
JSONArray options = content.getJSONArray("options");
List<JSONObject> options = content.getJSONArray("options").toJavaList(JSONObject.class);
WindowSize windowSize = null;
try {
windowSize = androidDriver.getWindowSize();
Expand All @@ -961,8 +961,7 @@ public void runMonkey(HandleDes handleDes, JSONObject content, List<JSONObject>
boolean isOpenActivityListener = false;
boolean isOpenNetworkListener = false;
if (!options.isEmpty()) {
for (int i = options.size() - 1; i >= 0; i--) {
JSONObject jsonOption = (JSONObject) options.get(i);
for (JSONObject jsonOption : options) {
if (jsonOption.getString("name").equals("sleepTime")) {
sleepTime = jsonOption.getInteger("value");
}
Expand Down Expand Up @@ -993,7 +992,6 @@ public void runMonkey(HandleDes handleDes, JSONObject content, List<JSONObject>
if (jsonOption.getString("name").equals("isOpenNetworkListener")) {
isOpenNetworkListener = jsonOption.getBoolean("value");
}
options.remove(options.get(i));
}
}
int finalSleepTime = sleepTime;
Expand Down

0 comments on commit a104ad1

Please sign in to comment.