[flutter_releases] Flutter Stable 2.0.3 Framework Cherrypicks (#78489)

* Avoid iOS local networking dialog in integration tests (#75163)

* ios_platform_view tests pass when device rotated (#75665)

* Consolidate ascii spinner stop in devtools activation (#75679)

* Fix problem causing tasks to timeout. (#76028)

This is because the command was actually collecting logs continuously
from the device. Additionally idevicesyslog does not have a reboot
option.

Bug: https://github.com/flutter/flutter/issues/76027

* fix Autovalidate enum references in fix data (#77419)

* roll engine cherrypicks

Co-authored-by: Jenn Magder <magder@google.com>
Co-authored-by: godofredoc <54371434+godofredoc@users.noreply.github.com>
Co-authored-by: Phil Quitslund <pq@users.noreply.github.com>
diff --git a/bin/internal/engine.version b/bin/internal/engine.version
index ccb5e92..7406cc8 100644
--- a/bin/internal/engine.version
+++ b/bin/internal/engine.version
@@ -1 +1 @@
-5d8bf811b3072390933d69f3e289a4bb673636c4
+3459eb24361807fb186953a864cf890fa8e9d26a
diff --git a/dev/devicelab/bin/tasks/build_mode_test.dart b/dev/devicelab/bin/tasks/build_mode_test.dart
index 9709467..67afa0e 100644
--- a/dev/devicelab/bin/tasks/build_mode_test.dart
+++ b/dev/devicelab/bin/tasks/build_mode_test.dart
@@ -18,7 +18,7 @@
   print('run: starting...');
   final Process run = await startProcess(
     path.join(flutterDirectory.path, 'bin', 'flutter'),
-    <String>['run', '--suppress-analytics', ...args],
+    <String>['run', '--suppress-analytics', '--no-publish-port', ...args],
     isBot: false, // we just want to test the output, not have any debugging info
   );
   final List<String> stdout = <String>[];
diff --git a/dev/devicelab/bin/tasks/flutter_run_test.dart b/dev/devicelab/bin/tasks/flutter_run_test.dart
index 4e96811..55b0fdf 100644
--- a/dev/devicelab/bin/tasks/flutter_run_test.dart
+++ b/dev/devicelab/bin/tasks/flutter_run_test.dart
@@ -39,7 +39,7 @@
   final Device device = await devices.workingDevice;
   await device.unlock();
   final List<String> options = <String>[
-    '-t', runTestSource.absolute.path, '-d', device.deviceId, '-v',
+    '-t', runTestSource.absolute.path, '-d', device.deviceId, '-v', '--no-publish-port',
   ];
   await inDirectory<void>(flutterGalleryDir, () async {
     final Process run = await startProcess(
diff --git a/dev/devicelab/bin/tasks/routing_test.dart b/dev/devicelab/bin/tasks/routing_test.dart
index d56d8ad..ee3627f 100644
--- a/dev/devicelab/bin/tasks/routing_test.dart
+++ b/dev/devicelab/bin/tasks/routing_test.dart
@@ -36,7 +36,7 @@
       final Process run = await startProcess(
         path.join(flutterDirectory.path, 'bin', 'flutter'),
         // --fast-start does not support routes.
-        <String>['run', '--verbose', '--disable-service-auth-codes', '--no-fast-start', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
+        <String>['run', '--verbose', '--disable-service-auth-codes', '--no-fast-start', '--no-publish-port', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
       );
       run.stdout
         .transform<String>(utf8.decoder)
diff --git a/dev/devicelab/bin/tasks/service_extensions_test.dart b/dev/devicelab/bin/tasks/service_extensions_test.dart
index 2e3a774..4cad2f5 100644
--- a/dev/devicelab/bin/tasks/service_extensions_test.dart
+++ b/dev/devicelab/bin/tasks/service_extensions_test.dart
@@ -26,7 +26,7 @@
       print('run: starting...');
       final Process run = await startProcess(
         path.join(flutterDirectory.path, 'bin', 'flutter'),
-        <String>['run', '--verbose', '--no-fast-start', '--disable-service-auth-codes', '-d', device.deviceId, 'lib/main.dart'],
+        <String>['run', '--verbose', '--no-fast-start', '--no-publish-port', '--disable-service-auth-codes', '-d', device.deviceId, 'lib/main.dart'],
       );
       run.stdout
           .transform<String>(utf8.decoder)
diff --git a/dev/devicelab/lib/framework/adb.dart b/dev/devicelab/lib/framework/adb.dart
index f81ec93..9d2ed7a 100644
--- a/dev/devicelab/lib/framework/adb.dart
+++ b/dev/devicelab/lib/framework/adb.dart
@@ -751,7 +751,7 @@
 
   @override
   Future<void> reboot() {
-    return Process.run('idevicesyslog', <String>['reboot', '-u', deviceId]);
+    return Process.run('idevicediagnostics', <String>['restart', '-u', deviceId]);
   }
 }
 
diff --git a/dev/devicelab/lib/tasks/hot_mode_tests.dart b/dev/devicelab/lib/tasks/hot_mode_tests.dart
index 0e43775..8e478de 100644
--- a/dev/devicelab/lib/tasks/hot_mode_tests.dart
+++ b/dev/devicelab/lib/tasks/hot_mode_tests.dart
@@ -33,7 +33,7 @@
     final File benchmarkFile = file(path.join(_editedFlutterGalleryDir.path, 'hot_benchmark.json'));
     rm(benchmarkFile);
     final List<String> options = <String>[
-      '--hot', '-d', deviceIdOverride, '--benchmark', '--resident',  '--no-android-gradle-daemon', '--verbose',
+      '--hot', '-d', deviceIdOverride, '--benchmark', '--resident',  '--no-android-gradle-daemon', '--no-publish-port', '--verbose',
     ];
     int hotReloadCount = 0;
     Map<String, dynamic> smallReloadData;
diff --git a/dev/devicelab/lib/tasks/microbenchmarks.dart b/dev/devicelab/lib/tasks/microbenchmarks.dart
index f6f1024..246455c 100644
--- a/dev/devicelab/lib/tasks/microbenchmarks.dart
+++ b/dev/devicelab/lib/tasks/microbenchmarks.dart
@@ -30,6 +30,7 @@
             '-v',
             // --release doesn't work on iOS due to code signing issues
             '--profile',
+            '--no-publish-port',
             '-d',
             device.deviceId,
           ];
diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart
index 8e9cad6..6697c83 100644
--- a/dev/devicelab/lib/tasks/perf_tests.dart
+++ b/dev/devicelab/lib/tasks/perf_tests.dart
@@ -484,6 +484,7 @@
       for (int i = 0; i < iterations; i += 1) {
         final int result = await flutter('run', options: <String>[
           '--no-android-gradle-daemon',
+          '--no-publish-port',
           '--verbose',
           '--profile',
           '--trace-startup',
@@ -783,6 +784,7 @@
         '--verbose',
         '--verbose-system-logs',
         '--purge-persistent-cache',
+        '--no-publish-port',
         '--profile',
         if (cacheSkSL) '--cache-sksl',
         '-d', _device.deviceId,
@@ -1286,6 +1288,7 @@
         'run',
         '--verbose',
         '--profile',
+        '--no-publish-port',
         '-d', _device.deviceId,
         driverTest,
       ],
@@ -1401,6 +1404,7 @@
       print('launching $project$test on device...');
       await flutter('run', options: <String>[
         '--verbose',
+        '--no-publish-port',
         '--no-fast-start',
         '--${_reportedDurationTestToString(flavor)}',
         '--no-resident',
diff --git a/dev/integration_tests/ios_platform_view_tests/lib/main.dart b/dev/integration_tests/ios_platform_view_tests/lib/main.dart
index cbce174..b8e5cd4 100644
--- a/dev/integration_tests/ios_platform_view_tests/lib/main.dart
+++ b/dev/integration_tests/ios_platform_view_tests/lib/main.dart
@@ -77,10 +77,11 @@
       ),
       body: Column(
         children: <Widget>[
-          Container(
-            child: const UiKitView(viewType: 'platform_view'),
-            width: 300,
-            height: 300,
+          Expanded(
+            child: Container(
+              child: const UiKitView(viewType: 'platform_view'),
+              width: 300,
+            ),
           ),
           ElevatedButton(
             key: button,
diff --git a/packages/flutter/lib/fix_data.yaml b/packages/flutter/lib/fix_data.yaml
index 3c65216..2a0111a 100644
--- a/packages/flutter/lib/fix_data.yaml
+++ b/packages/flutter/lib/fix_data.yaml
@@ -687,7 +687,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.always'
+              expression: 'AutovalidateMode.always'
               requiredIf: "autovalidate == 'true'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -698,7 +698,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.disabled'
+              expression: 'AutovalidateMode.disabled'
               requiredIf: "autovalidate == 'false'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -733,7 +733,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.always'
+              expression: 'AutovalidateMode.always'
               requiredIf: "autovalidate == 'true'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -744,7 +744,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.disabled'
+              expression: 'AutovalidateMode.disabled'
               requiredIf: "autovalidate == 'false'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -768,7 +768,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.always'
+              expression: 'AutovalidateMode.always'
               requiredIf: "autovalidate == 'true'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -779,7 +779,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.disabled'
+              expression: 'AutovalidateMode.disabled'
               requiredIf: "autovalidate == 'false'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -803,7 +803,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.always'
+              expression: 'AutovalidateMode.always'
               requiredIf: "autovalidate == 'true'"
           - kind: 'removeParameter'
             name: 'autovalidate'
@@ -814,7 +814,7 @@
             name: 'autovalidateMode'
             style: optional_named
             argumentValue:
-              expression: 'AutoValidateMode.disabled'
+              expression: 'AutovalidateMode.disabled'
               requiredIf: "autovalidate == 'false'"
           - kind: 'removeParameter'
             name: 'autovalidate'
diff --git a/packages/flutter/test_fixes/cupertino.dart.expect b/packages/flutter/test_fixes/cupertino.dart.expect
index f5687f6..08030bb 100644
--- a/packages/flutter/test_fixes/cupertino.dart.expect
+++ b/packages/flutter/test_fixes/cupertino.dart.expect
@@ -47,13 +47,13 @@
   final behavior = stack.clipBehavior;
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const Form form = Form(autovalidateMode: AutoValidateMode.always);
-  const Form form = Form(autovalidateMode: AutoValidateMode.disabled);
+  const Form form = Form(autovalidateMode: AutovalidateMode.always);
+  const Form form = Form(autovalidateMode: AutovalidateMode.disabled);
   final autoMode = form.autovalidateMode;
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const FormField formField = FormField(autovalidateMode: AutoValidateMode.always);
-  const FormField formField = FormField(autovalidateMode: AutoValidateMode.disabled);
+  const FormField formField = FormField(autovalidateMode: AutovalidateMode.always);
+  const FormField formField = FormField(autovalidateMode: AutovalidateMode.disabled);
   final autoMode = formField.autovalidateMode;
 
   // Changes made in https://github.com/flutter/flutter/pull/68736
diff --git a/packages/flutter/test_fixes/material.dart.expect b/packages/flutter/test_fixes/material.dart.expect
index 42f430c..091f88d 100644
--- a/packages/flutter/test_fixes/material.dart.expect
+++ b/packages/flutter/test_fixes/material.dart.expect
@@ -50,22 +50,22 @@
   final behavior = stack.clipBehavior;
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const Form form = Form(autovalidateMode: AutoValidateMode.always);
-  const Form form = Form(autovalidateMode: AutoValidateMode.disabled);
+  const Form form = Form(autovalidateMode: AutovalidateMode.always);
+  const Form form = Form(autovalidateMode: AutovalidateMode.disabled);
   final autoMode = form.autovalidateMode;
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const FormField formField = FormField(autovalidateMode: AutoValidateMode.always);
-  const FormField formField = FormField(autovalidateMode: AutoValidateMode.disabled);
+  const FormField formField = FormField(autovalidateMode: AutovalidateMode.always);
+  const FormField formField = FormField(autovalidateMode: AutovalidateMode.disabled);
   final autoMode = formField.autovalidateMode;
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const TextFormField textFormField = TextFormField(autovalidateMode: AutoValidateMode.always);
-  const TextFormField textFormField = TextFormField(autovalidateMode: AutoValidateMode.disabled);
+  const TextFormField textFormField = TextFormField(autovalidateMode: AutovalidateMode.always);
+  const TextFormField textFormField = TextFormField(autovalidateMode: AutovalidateMode.disabled);
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidateMode: AutoValidateMode.always);
-  const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidateMode: AutoValidateMode.disabled);
+  const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidateMode: AutovalidateMode.always);
+  const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidateMode: AutovalidateMode.disabled);
 
   // Changes made in https://github.com/flutter/flutter/pull/48547
   var TextTheme textTheme = TextTheme(
diff --git a/packages/flutter/test_fixes/widgets.dart.expect b/packages/flutter/test_fixes/widgets.dart.expect
index 4f0378c..0bbd7d1 100644
--- a/packages/flutter/test_fixes/widgets.dart.expect
+++ b/packages/flutter/test_fixes/widgets.dart.expect
@@ -38,13 +38,13 @@
   buildContext.findAncestorRenderObjectOfType<targetType>();
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const Form form = Form(autovalidateMode: AutoValidateMode.always);
-  const Form form = Form(autovalidateMode: AutoValidateMode.disabled);
+  const Form form = Form(autovalidateMode: AutovalidateMode.always);
+  const Form form = Form(autovalidateMode: AutovalidateMode.disabled);
   final autoMode = form.autovalidateMode;
 
   // Changes made in https://github.com/flutter/flutter/pull/61648
-  const FormField formField = FormField(autovalidateMode: AutoValidateMode.always);
-  const FormField formField = FormField(autovalidateMode: AutoValidateMode.disabled);
+  const FormField formField = FormField(autovalidateMode: AutovalidateMode.always);
+  const FormField formField = FormField(autovalidateMode: AutovalidateMode.disabled);
   final autoMode = formField.autovalidateMode;
 
   // Changes made in https://github.com/flutter/flutter/pull/66305
diff --git a/packages/flutter_tools/lib/src/devtools_launcher.dart b/packages/flutter_tools/lib/src/devtools_launcher.dart
index 7592a5c..6a4873d 100644
--- a/packages/flutter_tools/lib/src/devtools_launcher.dart
+++ b/packages/flutter_tools/lib/src/devtools_launcher.dart
@@ -155,18 +155,17 @@
         'devtools'
       ]);
       if (_devToolsActivateProcess.exitCode != 0) {
-        status.cancel();
         _logger.printError('Error running `pub global activate '
             'devtools`:\n${_devToolsActivateProcess.stderr}');
         return false;
       }
-      status.stop();
       _persistentToolState.lastDevToolsActivationTime = DateTime.now();
       return true;
     } on Exception catch (e, _) {
-      status.stop();
       _logger.printError('Error running `pub global activate devtools`: $e');
       return false;
+    } finally {
+      status.stop();
     }
   }