修复 gh_version 异常造成的闪退

This commit is contained in:
juntao
2021-02-04 16:07:51 +08:00
parent 3df381b255
commit 3e032fa540

View File

@ -482,9 +482,14 @@ public class PackageUtils {
if (gh_version != null && apkEntity.getGhVersion() != null && gh_id != null) {
gh_version = gh_version.substring(2);
return Long.parseLong(gh_version) < Long.parseLong(apkEntity.getGhVersion())
&& apkEntity.getForce()
&& gh_id.equals(gameId);
try {
return Long.parseLong(gh_version) < Long.parseLong(apkEntity.getGhVersion()) && apkEntity
.getForce() && gh_id.equals(gameId);
} catch (NumberFormatException exception) {
// gh_id 可能出錯
exception.printStackTrace();
return false;
}
}
return false;
}