Bruno Leroux d925ac1a53 [Android] Reset IME state in TextInputPlugin.clearTextInputClient (flutter/engine#49829)
## Description

This PR calls Android API `InputMethodManager.restartInput` to reset IMEs internal states. Otherwise some IMEs (Gboard for instance) keep reacting based on the previous input configuration until a new configuration is set.

- On Android native, `restartInput` is called in several places, for instance in f219798774/android/widget/TextView.java (L2458).
- On Compose, https://github.com/flutter/flutter/issues/70546#issuecomment-1088345561 pointed out where it is called.
- On Flutter, it is called at some point but mainly when another `TextField` is focused (it is mainly called in `setTextInputEditingState`).

## Related Issue

Fixes https://github.com/flutter/flutter/issues/70546.

## Tests

Adds 1 test.
2024-01-18 06:38:34 +00:00
..