Repository: flutter
Issue: Android: back button key events that are marked as handled are not always absorbed.
Labels: c: regression,platform-android,framework,engine,has reproducible steps,P2,found in release: 3.7,found in release: 3.10,team-android,triaged-android

When adding a `KeyboardHandler` to the root level the android back button stops working. But **only after a physical key was pressed** on the keyboard.

<details>
<summary>This behavior is in the latest master channel</summary>

```
Flutter 1.22.0-10.0.pre.380 • channel master • https://github.com/flutter/flutter.git
Framework • revision ec40df9576 (28 hours ago) • 2020-09-25 21:27:22 -0700
Engine • revision 3a73d073c8
Tools • Dart 2.11.0 (build 2.11.0-161.0.dev)
```

</details>

<details>
<summary>and dev channel (1.23.0-4.0.pre)</summary>

```
Flutter 1.23.0-4.0.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision 83dd176777 (5 days ago) • 2020-09-22 12:04:44 -0700
Engine • revision 2abe69c608
Tools • Dart 2.10.0 (build 2.10.0-136.0.dev)
```

</details>


<details>
<summary>in the beta channel (1.22.0-12.1.pre) the back button <strong>never</strong> works with a `KeyboardHandler`</summary>

```
Flutter 1.22.0-12.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 8b3760638a (11 days ago) • 2020-09-15 17:47:13 -0700
Engine • revision 4654fc6cf6
Tools • Dart 2.10.0 (build 2.10.0-110.3.beta)
```

</details>

<details>
<summary>but the problem <strong>does NOT</strong> happen in flutter stable 1.20.4 (in stable the keyboard handler gets the event, but the back action is also triggered in the navigator, so everything works as expected imo)</summary>

```
Flutter 1.20.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision fba99f6cf9 (12 days ago) • 2020-09-14 15:32:52 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2
```

</details>

## Steps to Reproduce

1. Use master or dev channel
2. create new app, add `KeyboardHandler` to root level of app (above `MaterialApp`) and create some navigator pages to click through
3. launch app in android emulator
4. type a key on the physical keyboard
5. press back button of emulator - nothing happens

Maybe this helps illustrate the problem:

![2020-09-27 10-28-22 gifcask 2020-09-27 10_32_50](https://user-images.githubusercontent.com/313066/94360415-50cebb80-00ad-11eb-9684-4d70e7c4c39f.gif)

Here is a simple flutter project to reproduce: https://github.com/hpoul/flutter_issue_backbutton

https://github.com/hpoul/flutter_issue_backbutton/blob/769eba6f50a6140423dac042b48d65669955469f/lib/main.dart#L11-L21

```dart
    return KeyboardHandler(
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: ExampleWidget(),
      ),
    );

```


## Logs

<details>
<summary>flutter doctor -v</summary>

```
➜  ~ flutter_dev doctor -v
[✓] Flutter (Channel dev, 1.23.0-4.0.pre, on Mac OS X 10.15.6 19G2021 x86_64, locale en-US)
    • Flutter version 1.23.0-4.0.pre at /Users/herbert/dev/flutter/flutter__dev
    • Framework revision 83dd176777 (5 days ago), 2020-09-22 12:04:44 -0700
    • Engine revision 2abe69c608
    • Dart version 2.10.0 (build 2.10.0-136.0.dev)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/herbert/dev/android/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/herbert/dev/android/sdk
    • Java binary at: /Users/herbert/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Users/herbert/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
    • IntelliJ at /Users/herbert/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 49.0.4
    • Dart plugin version 202.7319.5

[✓] VS Code (version 1.49.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (4 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • macOS (desktop)                    • macos         • darwin-x64     • Mac OS X 10.15.6 19G2021 x86_64
    • Web Server (web)                   • web-server    • web-javascript • Flutter Tools
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 86.0.4240.55 beta

• No issues found!
```

</details>