Skip to content

Commit

Permalink
Merge pull request #574 from segmentio/context-app-build-string
Browse files Browse the repository at this point in the history
Collect `context.app.build` as a string.
  • Loading branch information
f2prateek authored Feb 5, 2018
2 parents fb11f42 + 2eeee90 commit ffa1dd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void putApp(Context context) {
putUndefinedIfNull(app, APP_NAME_KEY, packageInfo.applicationInfo.loadLabel(packageManager));
putUndefinedIfNull(app, APP_VERSION_KEY, packageInfo.versionName);
putUndefinedIfNull(app, APP_NAMESPACE_KEY, packageInfo.packageName);
app.put(APP_BUILD_KEY, packageInfo.versionCode);
app.put(APP_BUILD_KEY, String.valueOf(packageInfo.versionCode));
put(APP_KEY, app);
} catch (PackageManager.NameNotFoundException e) {
// ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void create() {
.containsEntry("name", "org.robolectric.default")
.containsEntry("version", "undefined")
.containsEntry("namespace", "org.robolectric.default")
.containsEntry("build", 0);
.containsEntry("build", "0");

assertThat(context.getValueMap("device")) //
.containsEntry("id", "unknown")
Expand Down

0 comments on commit ffa1dd6

Please sign in to comment.