Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Call Glean initialize prior to set startup metrtics. (#3130)
Browse files Browse the repository at this point in the history
  • Loading branch information
daoshengmu authored Apr 7, 2020
1 parent 2454ab2 commit bce60f9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ public static void init(Context aContext) {
initialized = true;

final boolean telemetryEnabled = SettingsStore.getInstance(aContext).isTelemetryEnabled();
Configuration config = new Configuration(Configuration.DEFAULT_TELEMETRY_ENDPOINT, BuildConfig.BUILD_TYPE);
Glean.INSTANCE.initialize(aContext, telemetryEnabled, config);

if (telemetryEnabled) {
GleanMetricsService.start();
} else {
GleanMetricsService.stop();
}
Configuration config = new Configuration(Configuration.DEFAULT_TELEMETRY_ENDPOINT, BuildConfig.BUILD_TYPE);
Glean.INSTANCE.initialize(aContext, true, config);
}

// It would be called when users turn on/off the setting of telemetry.
Expand Down

0 comments on commit bce60f9

Please sign in to comment.