-
Notifications
You must be signed in to change notification settings - Fork 6k
Request a reattach when creating the text input plugin on Android #13474
Conversation
mklim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
matthew-carroll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left a comment about a name change.
| * to a {@link FlutterEngine}, as the engine may have kept alive a text | ||
| * editing client on the Dart side. | ||
| */ | ||
| public void reattach() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to call this something like requestExistingInputState() instead, so that we remove the implicit temporal relationship and clarify why we call it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM.
There may be an overflow happening, another lifecycle event before receiving the resumed event? It should print to the terminal when messages are dropped. The queues are all size 1 right now. |
git@github.com:flutter/engine.git/compare/0a8bd9dd6fbb...e73c9c8 git log 0a8bd9d..e73c9c8 --no-merges --oneline 2019-11-04 skia-flutter-autoroll@skia.org Roll src/third_party/skia 8e083eee8ece..4cc2dc64ff13 (1 commits) (flutter/engine#13543) 2019-11-04 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from ggsQ5... to XcaoM... (flutter/engine#13535) 2019-11-04 yjbanov@google.com fix getBoxesForRange for zero-length ranges (flutter/engine#13483) 2019-11-04 bkonyi@google.com Roll src/third_party/dart bbe2ac28c9..ab5cf0f854 (73 commits) (flutter/engine#13614) 2019-11-02 skia-flutter-autoroll@skia.org Roll src/third_party/skia 283ec65f632a..8e083eee8ece (32 commits) (flutter/engine#13489) 2019-11-02 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from FKqQ_... to ggsQ5... (flutter/engine#13490) 2019-11-02 xster@google.com Release shim bindings when detaching (flutter/engine#13432) 2019-11-01 gw280@google.com Add fuchsia.intl.PropertyProvider to our services on Fuchsia (flutter/engine#13486) 2019-11-01 fmil@google.com [dart] Makes the intl services available (flutter/engine#13460) 2019-11-01 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from 866GG... to dhwMR... (flutter/engine#13475) 2019-11-01 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from JngMB... to FKqQ_... (flutter/engine#13477) 2019-11-01 skia-flutter-autoroll@skia.org Roll src/third_party/skia 809ec77893be..283ec65f632a (14 commits) (flutter/engine#13472) 2019-11-01 dnfield@google.com Request a reattach when creating the text input plugin on Android (flutter/engine#13474) 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 cbracken@google.com on the revert to ensure that a human is aware of the problem. 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/+/master/autoroll/README.md
git@github.com:flutter/engine.git/compare/0a8bd9dd6fbb...e73c9c8 git log 0a8bd9d..e73c9c8 --no-merges --oneline 2019-11-04 skia-flutter-autoroll@skia.org Roll src/third_party/skia 8e083eee8ece..4cc2dc64ff13 (1 commits) (flutter/engine#13543) 2019-11-04 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from ggsQ5... to XcaoM... (flutter/engine#13535) 2019-11-04 yjbanov@google.com fix getBoxesForRange for zero-length ranges (flutter/engine#13483) 2019-11-04 bkonyi@google.com Roll src/third_party/dart bbe2ac28c9..ab5cf0f854 (73 commits) (flutter/engine#13614) 2019-11-02 skia-flutter-autoroll@skia.org Roll src/third_party/skia 283ec65f632a..8e083eee8ece (32 commits) (flutter/engine#13489) 2019-11-02 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from FKqQ_... to ggsQ5... (flutter/engine#13490) 2019-11-02 xster@google.com Release shim bindings when detaching (flutter/engine#13432) 2019-11-01 gw280@google.com Add fuchsia.intl.PropertyProvider to our services on Fuchsia (flutter/engine#13486) 2019-11-01 fmil@google.com [dart] Makes the intl services available (flutter/engine#13460) 2019-11-01 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from 866GG... to dhwMR... (flutter/engine#13475) 2019-11-01 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from JngMB... to FKqQ_... (flutter/engine#13477) 2019-11-01 skia-flutter-autoroll@skia.org Roll src/third_party/skia 809ec77893be..283ec65f632a (14 commits) (flutter/engine#13472) 2019-11-01 dnfield@google.com Request a reattach when creating the text input plugin on Android (flutter/engine#13474) 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 cbracken@google.com on the revert to ensure that a human is aware of the problem. 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/+/master/autoroll/README.md
Engine side of a fix for flutter/flutter#35054
If the view heirarchy was torn down, for example because the app was backgrounded and detached from the FlutterEngine instance, the embedder loses all knowledge of text input clients from the framework. However, the framework can maintain these client(s) if the engine is preserved. When the view is reattached, it needs to be re-informed of such clients. Another PR will be opened in the framework to respond to this message.
We can't use
AppLifecycleState.resumed, because it comes too early (Dart code receives it before the FlutterView has re-attached to the engine, and has no way of knowing when it's safe to re-send the message). @gaaclarke - I thought maybe the Channel Buffers stuff would handle that but apparently it's not. We can discuss more if that's unexpected./cc @dannyvalentesonos