Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1248)

Unified Diff: base/android/java/src/org/chromium/base/BuildInfo.java

Issue 14864023: [Android] Add app version code to chrome://version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/about_version.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/BuildInfo.java
diff --git a/base/android/java/src/org/chromium/base/BuildInfo.java b/base/android/java/src/org/chromium/base/BuildInfo.java
index 23140519b516a9e51ab58cbac72b50a0c3c48869..81a8f3455906f37ec26b553e1ae786a35805a90d 100644
--- a/base/android/java/src/org/chromium/base/BuildInfo.java
+++ b/base/android/java/src/org/chromium/base/BuildInfo.java
@@ -67,7 +67,10 @@ public class BuildInfo {
try {
PackageManager pm = context.getPackageManager();
PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
- msg = "" + pi.versionCode;
+ msg = "";
+ if (pi.versionCode > 0) {
+ msg = Integer.toString(pi.versionCode);
+ }
} catch (NameNotFoundException e) {
Log.d(TAG, msg);
}
« no previous file with comments | « no previous file | chrome/browser/resources/about_version.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698