Skip to content

Commit

Permalink
fix(android): return empty string if appVersion or appBuild fail (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Sep 27, 2019
1 parent 6791b04 commit 5bb526a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private String getAppVersion() {
PackageInfo pinfo = getContext().getPackageManager().getPackageInfo(getContext().getPackageName(), 0);
return pinfo.versionName;
} catch(Exception ex) {
return null;
return "";
}
}

Expand All @@ -78,7 +78,7 @@ private String getAppBuild() {
PackageInfo pinfo = getContext().getPackageManager().getPackageInfo(getContext().getPackageName(), 0);
return Integer.toString(pinfo.versionCode);
} catch(Exception ex) {
return null;
return "";
}
}

Expand Down

0 comments on commit 5bb526a

Please sign in to comment.