@@ -88,14 +88,6 @@ Future<int> run(
8888 await globals.analytics.setTelemetry (value);
8989 }
9090
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-
9991 await runner.run (args);
10092
10193 // Triggering [runZoned]'s error callback does not necessarily mean that
@@ -285,6 +277,11 @@ Future<int> _exit(int code, {required ShutdownHooks shutdownHooks}) async {
285277 // Ensure that the consent message has been displayed for unified analytics
286278 if (globals.analytics.shouldShowMessage) {
287279 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+ }
288285
289286 // Because the legacy analytics may have also sent a message,
290287 // the conditional below will print additional messaging informing
@@ -296,8 +293,7 @@ Future<int> _exit(int code, {required ShutdownHooks shutdownHooks}) async {
296293 'the flutter tool is migrating to a new analytics system. '
297294 'Disabling analytics collection will disable both the legacy '
298295 '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 ' );
301297 }
302298
303299 // Invoking this will onboard the flutter tool onto
0 commit comments