Repository: flutter
Issue: [Android] Keyboard not showing at startup on TextField has `autofocus: true`
Labels: a: text input,platform-android,engine,has reproducible steps,P2,e: samsung,found in release: 3.7,found in release: 3.9,team-android,triaged-android

## Steps to Reproduce

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) --> on Android device

**Expected results:** <!-- what did you want to see? -->

Expected: Keyboard should show

**Actual results:** <!-- what did you see? -->

Expected: Keyboard not showing

To my understanding setting TextField's autofocus to true should open the keyboard automatically.
I have not found any way to open the keyboard automatically at startup.

<details>
<summary>Code sample</summary>

```import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(body: Column(children: [
        Expanded(child: Center(child: Container(
          width: 200, height: 40,
          child: const TextField(autofocus: true,)
        )))
    ]));
  }
}
```

</details>

<details>
  <summary>Logs</summary>

<summary>Flutter analyze</summary>
```
PS C:\github\pageview_test> flutter analyze
Analyzing pageview_test...
No issues found! (ran in 1.9s)
```

<summary>Flutter doctor</summary>

```
[✓] Flutter (Channel stable, 3.7.7, on Microsoft Windows [Version 10.0.22621.1413], locale en-GB)
    • Flutter version 3.7.7 on channel stable at C:\Work\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2ad6cd72c0 (12 days ago), 2023-03-08 09:41:59 -0800
    • Engine revision 1837b5be5f
    • Dart version 2.19.4
    • DevTools version 2.20.1

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\Arni Richard Arnason\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33403.182
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.76.2)
    • VS Code at C:\Users\Arni Richard Arnason\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.60.0

[✓] Connected device (4 available)
    • SM G975F (mobile) • RF8MC1QFQFW • android-arm64  • Android 12 (API 31)
    • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.22621.1413]
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 111.0.5563.65
    • Edge (web)        • edge        • web-javascript • Microsoft Edge 111.0.1661.44

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>