Skip to content

Commit

Permalink
应用包名错误,或者应用不存在时,uninstall步骤认定为失败
Browse files Browse the repository at this point in the history
  • Loading branch information
caofengbin committed Jun 16, 2023
1 parent effc9fd commit 9e63363
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,13 @@ public void install(HandleContext handleContext, String path) {
public void uninstall(HandleContext handleContext, String appPackage) {
handleContext.setStepDes("卸载应用");
appPackage = TextHandler.replaceTrans(appPackage, globalParams);
handleContext.setDetail("App包名: " + appPackage);
try {
AndroidDeviceBridgeTool.uninstall(iDevice, appPackage);
String errorMessage = AndroidDeviceBridgeTool.uninstall(iDevice, appPackage);
if (errorMessage == null) {
handleContext.setDetail("App包名:" + appPackage + "卸载成功");
} else {
handleContext.setE(new Exception("uninstall app " + appPackage + " failed,errorMessage:" + errorMessage));
}
} catch (Exception e) {
handleContext.setE(e);
}
Expand Down

0 comments on commit 9e63363

Please sign in to comment.