Skip to content

Commit

Permalink
Don't overwrite build info unless Glean will get initialized.
Browse files Browse the repository at this point in the history
Previously a second invocation of Glean.initialize would override the stored build
info, even if no other work was done due to Glean already being
initialized.
  • Loading branch information
badboy committed Jan 6, 2022
1 parent 35e8d12 commit f1829e9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ open class GleanInternalAPI internal constructor () {
configuration: Configuration = Configuration(),
buildInfo: BuildInfo
) {
this.buildInfo = buildInfo

// Glean initialization must be called on the main thread, or lifecycle
// registration may fail. This is also enforced at build time by the
// @MainThread decorator, but this run time check is also performed to
Expand All @@ -159,6 +157,7 @@ open class GleanInternalAPI internal constructor () {
return
}

this.buildInfo = buildInfo
this.applicationContext = applicationContext

this.configuration = configuration
Expand Down

0 comments on commit f1829e9

Please sign in to comment.