66 Commits

Author SHA1 Message Date
Ali Mahdiyar
6b883e9ff7
Fix RTL handling in delete key event for android (#17393) 2020-04-16 01:48:21 -07:00
Jonah Williams
6e1d7f8883
[a11y] Support TalkBack reading by word, character, and paragraph (#17626) 2020-04-15 19:07:12 -07:00
Shi-Hao Hong
63f40903de
Revert getSystemGestureExclusionRects and setSystemGestureExclusionRects (#17613)
* Revert getSystemGestureExclusionRects and setSystemGestureExclusionRects 

* Remove references to removed PlatformChannelTest.java file
2020-04-09 20:44:37 -07:00
Gary Qian
3ddd1ef4b0
Implement repeat filtering logic in Android Embedder (#17509) 2020-04-08 12:51:43 -07:00
Jason Simmons
288b66b1b6
Disconnect from platform views and virtual displays before detaching from the engine (#17379) 2020-04-02 18:16:05 -07:00
Dan Field
2e909652ac
Fix bad texture view config (#17486) 2020-04-02 15:06:03 -07:00
Gary Qian
2e5568ede2
Implement getExtractedText in InputConnectionAdaptor (#17426) 2020-04-01 18:51:04 -07:00
Gary Qian
361d5d5320
Partially revert Samsung keyboard force-update workaround (#17391) 2020-03-29 15:46:39 -07:00
Emmanuel Garcia
025e2d82dd
Migrate embedding to AndroidX (#17075) 2020-03-13 21:19:24 -07:00
Emmanuel Garcia
25cded5742
Fix link in readme (#17119) 2020-03-12 13:59:31 -07:00
Emmanuel Garcia
cbc8713fdd
Define embedding dependencies in Gradle (#17116) 2020-03-12 13:49:46 -07:00
Edman P. Anjos
9beac71a2e
Add support for software text editing controls (#15560)
* Add support for software text editing controls

Includes selection, copy, cut, paste, as well as partial support for up
and down movement.

Text editing controls can be accessed in GBoard by:
  top-left arrow > three dots menu > text editing

Partial fix for flutter/flutter#9419 and flutter/flutter#37371.

* Introduce InputConnectionAdaptor tests

Run with:
  testing/run_tests.py --type=java --java-filter=io.flutter.plugin.editing.InputConnectionAdaptorTest

* Fix BUILD.gn comment on run_tests.py --java-filter flag
2020-02-28 20:18:04 +01:00
Justin McCandless
02aa865da3
Fix the newline on some keyboards (#16560) 2020-02-20 10:36:03 -08:00
Matt Carroll
f39bc73d6a
Exposes FlutterSurfaceView, and FlutterTextureView to FlutterActivity and FlutterFragment. (#41984, #47557) (#16552) 2020-02-12 19:21:00 -08:00
Gary Qian
c4c6ef6719
Samsung keyboard duplication workaround: updateSelection (#16547) 2020-02-12 19:51:40 -05:00
Michael Klimushyn
077918dcfd
Apply Google Java format (#16501)
This shouldn't result in any logical changes. I've done a quick smoke
test by building a local Android engine and running Flutter gallery, no
compile errors or other obvious issues.

Applied by running `/ci/format.sh | patch -p0` with the altered script
added in flutter/engine#16500. I did locally modify the script slightly
further so it would run against all Java files in the repo instead of
just modified ones.
2020-02-07 16:10:46 -08:00
Matt Carroll
95468839a0
Added API guards to flags in PlatformPlugin that were introduced after Flutter's min SDK version. (#13965) 2020-02-03 16:25:27 -08:00
Jason Simmons
7c95cdada4
Ensure that Android embedding initialization always uses an application context (#16204)
Some parts of the embedding (e.g. VsyncWaiter) may hold global references to
system services obtained through the context used during initialization.
These must not be associated with an activity or other non-application context.

Fixes https://github.com/flutter/flutter/issues/49612
2020-01-31 12:09:38 -08:00
Matt Carroll
eecb5e5c25
Notify PlatformViewsController within FlutterEngine when a hot restart occurs. (#48518) (#16230) 2020-01-30 12:58:41 -08:00
Michael Klimushyn
6fa1fcda8f
Register plugins at the right time, once (#15979)
Currently we're automatically registering plugins both when the
FlutterEngine is constructed and in the `flutter create` template, when
FlutterActivity#configureFlutterEngine is called. The initial
registration is too early to contain a reference to the activity and the
second registration can cause problems in some plugins.

This alters the flow so automatic registration happens in two discrete
places, and contains the `activity` in its first and only call for most
apps.

1. We're no longer automatically registering plugins on `FlutterEngine`
in any of our activities/fragments at construction time. But since the
FlutterEngine default constructor still automatically registers plugins,
anyone constructing the engine themselves (for example, in a service) is
still going to get automatic registration at `FlutterEngine`
instantiation time.
2. We now automatically register plugins in the base `FlutterActivity`'s
`configureFlutterEngine` hook. Anyone using `FlutterActivity` (or
`FlutterFragment`) should be automatically registered once that hook is
called. Right now the `flutter create` template overrides the base class
method with a subclass that registers everything manually in the same
spot. But with this in place we can safely recommend to remove the
subclass and rely on this hook to automatically register going forward.
Registering at this time means `activity` is set correctly.
2020-01-25 00:34:52 -08:00
Matt Carroll
fec9573786
Prevent duplicate plugin registration in FlutterEnginePluginRegistry. (#49365) (#15956) 2020-01-24 15:57:51 -08:00
Gary Qian
5734eceddf
Samsung fix duplication on punctuation: Update keyboard on finish compose. (#15701) 2020-01-16 18:04:58 -08:00
Greg Spencer
73cdd0ef70
Fix hardware keyboard enter so it triggers an action. (#15568)
This changes the InputConnectionAdaptor so that it will execute an IME action when ENTER is pressed. Prior to this, pressing ENTER on a hardware keyboard did nothing.
2020-01-15 11:13:39 -08:00
Matt Carroll
4513205b13 Make BackgroundMode public. (#45747) (#14673) 2020-01-08 21:41:34 -08:00
Dan Field
73da385c11
Disable a11y on detach (#14142) 2019-12-05 11:16:38 -08:00
Gary Qian
2c0eee4392
Always set mEditable values when different in TextPlugin (#13951) 2019-11-27 07:51:04 +09:00
Matt Carroll
687a1a7541
Add support for --dart-flags in FlutterShellArgs. (#44855) (#13855) 2019-11-14 04:09:08 +00:00
chunhtai
1f1e2ba58e
reland add lifecycle enum (#13767)
This reverts commit 8ebb318401344793daa10c3bec97c34891cf7cc8.
2019-11-13 11:26:25 -08:00
Matt Carroll
e19ee72f31
Expose asset lookup from plugin binding. (#42019) (#13743) 2019-11-12 07:14:27 +00:00
chunhtai
8ebb318401
Revert "Issues/39832 reland (#13642)" (#13720)
This reverts commit 1bfb928e071674a21779cee94908fbcae1c2e657.
2019-11-06 11:41:36 -08:00
chunhtai
1bfb928e07
Issues/39832 reland (#13642)
* Reland "Added new lifecycle enum (#11913)"
2019-11-05 14:52:16 -08:00
chunhtai
fe0838e948
Revert "Added new lifecycle enum (#11913)" (#13632)
This reverts commit 02a479007420b05df8e075978ecdd15442ea520f.
2019-11-04 13:40:20 -08:00
chunhtai
02a4790074
Added new lifecycle enum (#11913) 2019-11-04 12:33:41 -08:00
xster
7aa40556a4
Release shim bindings when detaching (#13432) 2019-11-01 17:53:15 -07:00
Dan Field
ced6c63d1e
Request a reattach when creating the text input plugin on Android (#13474) 2019-11-01 15:29:33 -07:00
Jason Simmons
c604fd4395
Pass the automaticallyRegisterPlugins flag to the FlutterEngine constructor in FlutterActivityTest (#13468) 2019-10-31 16:06:37 -07:00
Matt Carroll
c882439cb3
Automatically register plugins in FlutterEngine. (#43855) (#13455) 2019-10-31 14:10:45 -07:00
Dan Field
4b76fadbf4
Fizzle onConfigurationChanged if no FlutterView (#13445) 2019-10-30 15:49:02 -07:00
Matt Carroll
97807b5341
Automatically destroy FlutterEngine when created by FlutterActivity or FlutterFragment. (#13423) 2019-10-30 15:01:57 -07:00
Matt Carroll
3ebf006904
Deprecated DartExecutor as BinaryMessenger and added a getBinaryMessenger() method. (#43202) (#13349) 2019-10-25 20:07:13 -07:00
Matt Carroll
74d18bce34
Android embedding API updates for plugin ecosystem - plugin facade, split Lifecycle, save state callbacks to plugins (#43241, #43242, #43295) (#13280) 2019-10-24 19:10:05 -07:00
Justin McCandless
7071dc7061
NO_SUGGESTIONS keyboard flag in Android (#13099)
Add the enableSuggestions parameter to control Android's keyboard suggestions
2019-10-23 10:47:19 -07:00
Matt Carroll
ee91881ccc
Adds Dark Mode support to new Android embedding (this was accidentally missed previously). (#13215) 2019-10-18 12:46:09 -07:00
Michael Klimushyn
531a9cfb8e
Fire PlatformViewController FlutterView callbacks (#13015)
Fixes a bug where `PlatformViewController` was not being notified of `FlutterView` attachment changes.
2019-10-14 14:03:25 -07:00
Matt Carroll
9acec4102a
Move initialization into FlutterEngine (#12806) 2019-10-11 16:15:55 -07:00
Matt Carroll
d9d92a564b
Added FlutterActivity and FlutterFragment hook to cleanUpFlutterEngine() as symmetry for configureFlutterEngine(). (#41943) (#12987) 2019-10-11 13:52:21 -07:00
Gary Qian
ecf4f464c7
Restart all modern Samsung keyboard IMM (#12780) 2019-10-04 15:14:38 -04:00
Jason Simmons
5c428d9247 Check for a null input method subtype (#12706)
Fixes https://github.com/flutter/flutter/issues/41557
2019-10-01 09:03:47 -07:00
Matt Carroll
5b952f286f
Forwards Flutter View to platform views and detaches when needed. (#12359) 2019-09-26 15:34:01 -07:00
Michael Klimushyn
efb7bf434f
Work around Samsung keyboard issue (#12432)
Samsung's Korean keyboard has a bug where it always attempts to combine
characters based on its internal state, ignoring if and when the cursor
is moved programmatically. EG typing "ㄴㅇ" and then moving the cursor
back to the front of the text and typing "ㄴ" again would result in
"ㄴㅇㄴ", not "ㄴㄴㅇ".

Fully restarting the IMM works around this because it flushes the
keyboard's internal state and stops it from trying to incorrectly
combine characters. However this also has some negative performance
implications, so we only apply the workaround on Samsung devices set
to use Korean input.

This also effectively disables the feature on Samsung keyboards that
allowed users to re-open a composing region for previously typed
characters. See https://github.com/flutter/flutter/issues/29341#issuecomment-531283508.

Fixes flutter/flutter#29341.
2019-09-25 11:16:32 -07:00