[dartdev] Update --enable-analytics to re-enable unified analytics
Previously, running `dart --disable-analytics` would disable this, but `dart --enable-analytics` would not re-enable. Change-Id: I3da33f0c0ed9a3e29ff4fbbfd66ceeb030014c4b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295522 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Janice Collins <jcollins@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
committed by
Commit Queue
parent
eee509140d
commit
3149f813bb
@@ -172,6 +172,11 @@ class DartdevRunner extends CommandRunner<int> {
|
||||
} else if (topLevelResults['enable-analytics']) {
|
||||
analytics.enabled = true;
|
||||
|
||||
// Enable sending data via the unified analytics package.
|
||||
var unifiedAnalytics = createUnifiedAnalytics();
|
||||
await unifiedAnalytics.setTelemetry(true);
|
||||
unifiedAnalytics.close();
|
||||
|
||||
// Alert the user again that data will be collected.
|
||||
print(analyticsNoticeOnFirstRunMessage);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user