57 Commits

Author SHA1 Message Date
Hamdi Kahloun
b2ace0cccb
SecurityException: Permission Denial (#21290)
Fix `java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider`

Fixes flutter/flutter#66108

Co-authored-by: Dan Field <dfield@gmail.com>
2020-10-08 14:36:51 -07:00
Jason Simmons
88fd4cea43
Extract the WindowInsetsAnimation.Callback subclass into a separate class that will be lazily loaded (#21548)
WindowInsetsAnimation.Callback was introduced in API level 30.  This
PR moves the text input plugin's WindowInsetsAnimation.Callback subclass
into a class that will only be loaded if the embedding has checked for a
sufficient API level.

See https://github.com/flutter/flutter/issues/66908
2020-10-02 11:23:42 -07:00
Ren You
83b9df9df5
Revert "Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#21163)" (#21513)
This reverts commit 539034ae850d422a5449edcb36c60ad90ac91905.
2020-09-30 09:34:05 -07:00
Greg Spencer
539034ae85
Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#21163)
This switches from using dispatchKeyEvent to using dispatchKeyEventPreIme so that keys can be intercepted before they reach the IME and be handled by the framework.

It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends the to Flutter before sending them to the IME (which it now only does if they are not handled by the framework).

This fixes the problem where pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.

Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent.
2020-09-29 12:46:29 -07:00
Gary Qian
de3db5db92
Locale -> LanguageRange conversion to be more general in Android platformResolvedLocale (#21350) 2020-09-23 21:52:02 -07:00
Jason Simmons
1345359642
Fix boolean value checks in StandardMessageCodec (#21270)
Fixes https://github.com/flutter/flutter/issues/65619
2020-09-23 16:31:07 -07:00
Gary Qian
933f811d94
Remove extraneous window inset call on IME animation (#21213) 2020-09-16 14:04:50 -07:00
Hamdi Kahloun
8d7103f572
Fix NPE in PlatformPlugin.getClipboardData() (#21189) 2020-09-15 17:00:57 -07:00
Gary Qian
242d522077
[Android R] Sync keyboard animation with view insets vs Android 11/R/API 30 WindowInsetsAnimation (#20843) 2020-09-04 02:06:30 -07:00
Jason Simmons
d67923feb1
Pass text input key events to the EventResponder if they do not yield characters (#20912)
If the InputConnectionAdaptor receives a key event that does not move
the caret or produce a text character (such as the back button), then
the event should be given to the EventResponder which will forward it
to the view.

Fixes https://github.com/flutter/flutter/issues/64864
2020-08-31 17:56:09 -07:00
LI DONGZE
da5eb26b5d
Reporting back native stacktrace to dart side for crash reporting. (#20280)
* Add native stacktrace on iOS

* Add native stacktrace on Android

* format and changing naming to errorWithCode on iOS

* reformat

* Remove stacktrace from decodeEnvelope, not needed.

* Separate encodeErrorEnvelopeWithStacktrace with original encode function

* Add unit tests

* re-format

* change comments for stacktrace

* Remove changes for iOS

Co-authored-by: Ben Li <libe@google.com>
2020-08-21 19:59:36 -07:00
Stas Parshin
8177937133
Fix NPE in PlatformViewsController.checkInputConnectionProxy (#20622) 2020-08-19 08:34:04 -07:00
Emmanuel Garcia
615679865a
Reland: Create PlatformView instance right after method channel call from Dart (#20568) 2020-08-17 16:28:15 -07:00
gaaclarke
7b9ac278c9
Revert "Create PlatformView instance right after method channel call from Dart (#20500)" (#20564)
This reverts commit 9333b7c1d0ac7b2ae97998df116fcb0f99b1f26f.
2020-08-17 11:17:03 -07:00
Emmanuel Garcia
9333b7c1d0
Create PlatformView instance right after method channel call from Dart (#20500) 2020-08-14 15:06:02 -07:00
Justin McCandless
33015c6c7a
hasStrings on Android (#20393)
hasStrings message for checking for pasteable clipboard contents without actually reading them, for iOS14 clipboard alerts.
2020-08-14 08:45:18 -07:00
guolinaileen
594284baee
Add TextInput performPrivateCommand to Flutter Engine (#20188)
New command for Crowdsource 2/2
2020-08-10 14:04:11 -07:00
guolinaileen
ef1fd32b83
Add TextInput sendAppPrivateCommand to Flutter Engine (#20144)
Adds sendAppPrivateCommand for Crowdsource
2020-08-07 17:15:05 -07:00
Emmanuel Garcia
7f5d044f36
Wait before switching surfaces (#20100) 2020-07-30 20:36:01 -07:00
LongCatIsLooong
d96371e03f
Add autofill save for iOS and Android (#18643) 2020-07-28 10:23:55 -07:00
Emmanuel Garcia
88ebc37106
Remove android view from the Mutator stack (#19972) 2020-07-23 10:50:15 -07:00
Emmanuel Garcia
12847e899e
Support talkback in hybrid composition (#19860) 2020-07-17 18:56:02 -07:00
Kaushik Iska
1832613e09
[android] Childview will process its motion events (#19662) 2020-07-14 19:18:14 -07:00
Kaushik Iska
3dc81635db
[android] Pass synthesized eventType to VirtualDisplay platform views and fix memory leak (#19620) 2020-07-09 18:06:02 -07:00
Justin McCandless
033c373730
Make DPAD movement consider grapheme clusters (#17420)
Moving the caret with the software Dpad now correctly considers complex characters.
2020-07-08 13:59:58 -07:00
Gary Qian
559d93d978
Android native locale resolution algorithm (#19266) 2020-06-26 02:48:33 -07:00
Tong Mu
b3e7732cf9
System mouse cursor: Android (#18569)
Adds system mouse cursor to the Android engine.
2020-06-01 18:08:43 -07:00
Mehmet Fidanboylu
6c5f2396e1
Add tests for StandardMethodCodec (#18521) 2020-05-20 21:02:03 -07:00
xster
33ea63fbbd
Move robolectric tests to sdk 28 (#18525) 2020-05-20 09:19:35 -07:00
LongCatIsLooong
496585505f
[Android] setDimens on ViewNodes for autofill (#18444) 2020-05-18 10:23:33 -07:00
Ali Mahdiyar
9cdb5a9b6a
Custom unicode handling for Android backspace via JNI to ICU (#17960) 2020-05-06 14:01:02 -07:00
Gary Qian
7a05fcbdbe
Revert "Remove Samsung workarounds (#17612)" (#18081)
This reverts commit a5e0b2f2f2376cdd87f9c690ae1ab6074321ecc3.
2020-05-01 13:14:27 -07:00
Gary Qian
0273fab759
Hand off presentation properly in VirtualDisplayController.resize() (#17897) 2020-04-23 15:32:20 -07:00
Gary Qian
a5e0b2f2f2
Remove Samsung workarounds (#17612) 2020-04-17 17:38:30 -07:00
Jason Simmons
f9e53c72c6
Unregister the TextInputChannel method handler when the TextInputPlugin is destroyed (#17646)
Fixes https://github.com/flutter/flutter/issues/54275
2020-04-17 14:25:34 -07:00
LongCatIsLooong
cf3d738f50
Android text input autofill (#17465) 2020-04-16 03:41:23 -07:00
Ali Mahdiyar
6b883e9ff7
Fix RTL handling in delete key event for android (#17393) 2020-04-16 01:48:21 -07:00
Gary Qian
3ddd1ef4b0
Implement repeat filtering logic in Android Embedder (#17509) 2020-04-08 12:51:43 -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
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
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
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
Gary Qian
2c0eee4392
Always set mEditable values when different in TextPlugin (#13951) 2019-11-27 07:51:04 +09:00
Dan Field
ced6c63d1e
Request a reattach when creating the text input plugin on Android (#13474) 2019-11-01 15:29:33 -07:00