Skip to content

Commit

Permalink
#43 Fixed checking new version crashing problem
Browse files Browse the repository at this point in the history
  • Loading branch information
MewX committed Nov 4, 2018
1 parent 7c1f54c commit 7859e4c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ protected Integer doInBackground(String... strings) {
// return version code
byte[] codeByte = LightNetwork.LightHttpDownload(strings[0]);
if (codeByte == null) return -1;
String code = new String(codeByte);
String code = new String(codeByte).trim();
Log.d("MewX", "version code: " + code);
if (code.trim().isEmpty() || !TextUtils.isDigitsOnly(code.trim())) return -1;
if (code.isEmpty() || !TextUtils.isDigitsOnly(code)) return -1;
else return Integer.parseInt(code);
}

Expand Down

0 comments on commit 7859e4c

Please sign in to comment.