Repository: flutter
Issue: RawKeyboard listener not working as expected when holding a key on Android Emulator
Labels: a: text input,platform-android,engine,d: api docs,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-android,triaged-android

RawKeyboard listener don't seem to produce the correct behavior when a key is hold down, the callback keeps getting called with key down and key up events, even when the key is not released yet. I have tested on beta and master channel. 

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Run `flutter create bug`.
2. Update the main method to the following code:

```dart
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  RawKeyboard.instance.addListener((e) {
    print(e);
  });
  runApp(MyApp());
}
```

**Expected results:**
When I hold a key down, it should print a key down event and when I release the key, a key up should be printed

**Actual results:**
Multiple key up and key downs are printed one after another as long as the key is pressed, like this log below:

```
I/flutter (27288): RawKeyDownEvent#d8ba9(logicalKey: LogicalKeyboardKey#00061(keyId: "0x00000061", keyLabel: "a", debugName: "Key A"), physicalKey: PhysicalKeyboardKey#70004(usbHidUsage: "0x00070004", debugName: "Key A"))
I/flutter (27288): RawKeyUpEvent#d1186(logicalKey: LogicalKeyboardKey#00061(keyId: "0x00000061", keyLabel: "a", debugName: "Key A"), physicalKey: PhysicalKeyboardKey#70004(usbHidUsage: "0x00070004", debugName: "Key A"))
I/flutter (27288): RawKeyDownEvent#90489(logicalKey: LogicalKeyboardKey#00061(keyId: "0x00000061", keyLabel: "a", debugName: "Key A"), physicalKey: PhysicalKeyboardKey#70004(usbHidUsage: "0x00070004", debugName: "Key A"))
I/flutter (27288): RawKeyUpEvent#91e0c(logicalKey: LogicalKeyboardKey#00061(keyId: "0x00000061", keyLabel: "a", debugName: "Key A"), physicalKey: PhysicalKeyboardKey#70004(usbHidUsage: "0x00070004", debugName: "Key A"))
I/flutter (27288): RawKeyDownEvent#2fcef(logicalKey: LogicalKeyboardKey#00061(keyId: "0x00000061", keyLabel: "a", debugName: "Key A"), physicalKey: PhysicalKeyboardKey#70004(usbHidUsage: "0x00070004", debugName: "Key A"))
```

<details>
  <summary>Logs</summary>

```
[✓] Flutter (Channel master, 1.26.0-2.0.pre.103, on macOS 11.0.1 20B29 darwin-x64, locale pt-BR)
    • Flutter version 1.26.0-2.0.pre.103 at /Users/erick.zanardo/flutter
    • Framework revision 32741c0ec8 (17 hours ago), 2020-12-21 18:34:02 -0600
    • Engine revision af6889a600
    • Dart version 2.12.0 (build 2.12.0-169.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/erick.zanardo/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/erick.zanardo/Library/Android/sdk
    • Java binary at: /Applications/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.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] Connected device (2 available)
    • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 87.0.4280.88

• No issues found!
```
</details>