@@ -88,14 +88,6 @@ Future<int> run(
88
88
await globals.analytics.setTelemetry (value);
89
89
}
90
90
91
- // If the user has opted out of legacy analytics, we will continue
92
- // to opt them out of unified analytics and inform them
93
- if (! globals.flutterUsage.enabled && globals.analytics.telemetryEnabled) {
94
- await globals.analytics.setTelemetry (false );
95
- globals.logger.printStatus (
96
- 'Please note that analytics reporting was already disabled, and will continue to be disabled.\n ' );
97
- }
98
-
99
91
await runner.run (args);
100
92
101
93
// Triggering [runZoned]'s error callback does not necessarily mean that
@@ -285,6 +277,11 @@ Future<int> _exit(int code, {required ShutdownHooks shutdownHooks}) async {
285
277
// Ensure that the consent message has been displayed for unified analytics
286
278
if (globals.analytics.shouldShowMessage) {
287
279
globals.logger.printStatus (globals.analytics.getConsentMessage);
280
+ if (! globals.flutterUsage.enabled) {
281
+ globals.printStatus (
282
+ 'Please note that analytics reporting was already disabled, '
283
+ 'and will continue to be disabled.\n ' );
284
+ }
288
285
289
286
// Because the legacy analytics may have also sent a message,
290
287
// the conditional below will print additional messaging informing
@@ -296,8 +293,7 @@ Future<int> _exit(int code, {required ShutdownHooks shutdownHooks}) async {
296
293
'the flutter tool is migrating to a new analytics system. '
297
294
'Disabling analytics collection will disable both the legacy '
298
295
'and new analytics collection systems. '
299
- 'You can disable analytics reporting by running either `flutter --disable-telemetry` '
300
- 'or `flutter config --no-analytics\n ' );
296
+ 'You can disable analytics reporting by running `flutter --disable-telemetry`\n ' );
301
297
}
302
298
303
299
// Invoking this will onboard the flutter tool onto
0 commit comments