Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Return keyboard pressed state #41695

Conversation

bleroux
Copy link
Contributor

@bleroux bleroux commented May 3, 2023

Description

This PR updates the Android engine in order to answer to keyboard pressed state queries from the framework (as implemented in flutter/flutter#122885).

Related Issue

Fixes flutter/flutter#122441
Android engine implementation for flutter/flutter#87391

Tests

Adds 2 tests.

@bleroux bleroux force-pushed the android_listen_and_answer_to_keyboard_pressed_state_queries branch 5 times, most recently from df8c8a9 to 2364127 Compare May 4, 2023 07:12
@bleroux bleroux force-pushed the android_listen_and_answer_to_keyboard_pressed_state_queries branch from 2364127 to e04745d Compare May 4, 2023 07:52
@bleroux bleroux requested a review from dkwingsmt May 4, 2023 09:02
@reidbaker reidbaker requested a review from dnfield May 4, 2023 18:35
@dnfield
Copy link
Contributor

dnfield commented May 4, 2023

Tagged a couple people who are more up to date on the Android Keyboard stack than I am at this point.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from my point of view, maybe @dkwingsmt should have the final say.

@chinmaygarde
Copy link
Member

Ping @dkwingsmt for a second review.

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, sorry, I read it a while ago and thought I clicked approval but didn't.

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label May 18, 2023
@auto-submit auto-submit bot merged commit 17227c1 into flutter:main May 18, 2023
32 checks passed
@bleroux bleroux deleted the android_listen_and_answer_to_keyboard_pressed_state_queries branch May 18, 2023 21:51
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 18, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 18, 2023
…127143)

flutter/engine@c7c679d...17227c1

2023-05-18 leroux_bruno@yahoo.fr [Android] Return keyboard pressed state (flutter/engine#41695)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…lutter#127143)

flutter/engine@c7c679d...17227c1

2023-05-18 leroux_bruno@yahoo.fr [Android] Return keyboard pressed state (flutter/engine#41695)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
dkwingsmt added a commit that referenced this pull request Jun 7, 2023
dkwingsmt added a commit that referenced this pull request Jun 7, 2023
Reverts #41695 due to internal bug report b/284945818.

cc @bleroux let's investigate some day.
CaseyHillers pushed a commit to CaseyHillers/engine that referenced this pull request Jun 8, 2023
Reverts flutter#41695 due to internal bug report b/284945818.

cc @bleroux let's investigate some day.
CaseyHillers pushed a commit that referenced this pull request Jun 8, 2023
Reverts #41695 due to internal bug report b/284945818.

b/286341060

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
@bleroux bleroux restored the android_listen_and_answer_to_keyboard_pressed_state_queries branch June 8, 2023 19:14
CaseyHillers pushed a commit to CaseyHillers/engine that referenced this pull request Jun 13, 2023
Reverts flutter#41695 due to internal bug report b/284945818.

cc @bleroux let's investigate some day.
XilaiZhang pushed a commit to XilaiZhang/engine that referenced this pull request Jun 13, 2023
Reverts flutter#41695 due to internal bug report b/284945818.

cc @bleroux let's investigate some day.
CaseyHillers pushed a commit that referenced this pull request Jun 13, 2023
Reverts #41695 due to internal bug
report b/284945818.

cherry pick request was filed at b/287043578

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
auto-submit bot pushed a commit that referenced this pull request Jun 21, 2023
## Description

This PR updates the Android engine in order to answer to keyboard pressed state queries from the framework (as implemented in flutter/flutter#122885).

This is a rework of #41695 which was reverted in #42346.

This issue with #41695 was that the framework side did not get an answer when the channel was setup in the engine without registering a handler (on the engine side) to handle framework requests. The issue was reproducible when the engine initialization was managed by the app (see flutter/flutter#122441 (comment) for a repro).

This PR fixes this issue by changing `flutter/keyboard` lifecycle: the engine now creates the channel and registers a handler just after the channel creation.
In order to avoid regression, this PR also updates the channel implemenation (see `KeyboardChannel`) to return an empty `HashMap` when there is no handler registered.

## Related Issue

Android engine implementation for flutter/flutter#87391
(see #42346 for Linux implementation)
Fixes flutter/flutter#122441

## Tests

Adds 3 tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-android
Projects
None yet
5 participants