215 Commits

Author SHA1 Message Date
Mehmet Fidanboylu
6c5f2396e1
Add tests for StandardMethodCodec (#18521) 2020-05-20 21:02:03 -07:00
Mehmet Fidanboylu
b0e9f7c1b2
Handle Throwable in StandardMethodCodec (#18490) 2020-05-19 15:15:49 -07:00
LongCatIsLooong
496585505f
[Android] setDimens on ViewNodes for autofill (#18444) 2020-05-18 10:23:33 -07:00
LongCatIsLooong
8b4987382e
add new keyboard types and missing autofill hints (#18202) 2020-05-11 19:41:46 -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
Amir Hardon
f13031b026
Dispatch platform view touch events to the presentation (#17792) 2020-04-17 17:19:10 -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
Jason Simmons
beb8a7ec48
Update editing state in InputConnectionAdaptor.setSelection (#17652)
The BaseInputConnection superclass does not call endBatchEdit
in setSelection and therefore does not implicitly cause
InputConnectionAdaptor to send a state update.

Some input modes such as numeric keypads will not function without
these updates.
2020-04-11 17:29:50 -07:00
Gary Qian
2d19576f24
Implement Hashcode for TextEditingValue in InputConnectionAdaptor (#17643) 2020-04-10 16:00:01 -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
Amir Hardon
2fab00eb83
Fix AlertDialogs built by platform views (#17511) 2020-04-06 15:06:07 -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
Gary Qian
2e5568ede2
Implement getExtractedText in InputConnectionAdaptor (#17426) 2020-04-01 18:51:04 -07:00
Jason Simmons
141d2ea050
Use the private presentation window type for platform view windows (#17385) 2020-03-30 14:26:10 -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
xster
1ff81bc117
Make a pass through all the embedding javadocs (#17109) 2020-03-13 16:34:34 -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
Matt Carroll
55c64a92d8
Point old plugin registry accessors to new embedding plugin accessors. (#44225) (#13739) 2019-11-09 01:55:59 +00:00
Dan Field
ced6c63d1e
Request a reattach when creating the text input plugin on Android (#13474) 2019-11-01 15:29:33 -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
Jason Simmons
72420a3ba5
Remove redundant call to updateEditingState in sendKeyEvent (#13175)
See https://github.com/flutter/flutter/issues/41005
2019-10-16 15:53:12 -07:00
Gary Qian
ecf4f464c7
Restart all modern Samsung keyboard IMM (#12780) 2019-10-04 15:14:38 -04:00
gaaclarke
e9c2102373
Expanded channel buffer resize to method channels. (#12725)
* Expanded channel buffer resize to method channels.
2019-10-02 17:59:59 -07:00
gaaclarke
f407e06970
Resize channel buffers (#12402)
Made it so you can resize channel buffers by sending messages to them.
2019-10-01 10:31:25 -07: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
Jonas Uekötter
d2c1514084 Write MINIMAL_SDK to exception message (#11345)
This changes writes the required and current Android SDK level to the exception message. This enables Crash Reporting tools to capture more information about this crash.
2019-09-23 17:20:26 -07:00
Dan Field
7fb14000fd
java lints (#12354) 2019-09-18 21:20:04 -07:00
Jason Simmons
783deab110
Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (#12306) 2019-09-16 16:26:39 -07:00
rafern
63873d9f42 Fix objects equal to null not being detected as null (#11283) 2019-09-16 12:16:38 -07:00
Michael Klimushyn
dfa9498360
Enable platform view keyboard input on Android Q (#12085)
Naively embedded platform views on Android were never able to receive
keyboard input, because they were never focusable. So far we've worked
around the limiation by hooking into InputMethodManager and proxying the
InputConnection from a focused window over to the embeded view.

Android Q changed InputMethodManager to be instanced per display instead
of a singleton. Because of this our proxy hook was never being called,
since it was being set up on a different instance of IMM than was being
used in the virtual display.

Update `SingleViewPresentation` to store the IMM from the focused window
and return it whenever there are any calls to `INPUT_METHOD_SERVICE`.
This hooks our proxy back into place for the embedded view in the
virtual display. This restores the functionality of our workaround from
previous versions.

Unfortunately there's still a lot of noisy error logs from IMM here. It
can tell that the IMM has a different displayId than what it's expecting
from the window.

This also updates the unit tests to support SDK=27. SDK 16 doesn't have
DisplayManager, so there were NPEs attempting to instantiate the class
under test.
2019-09-12 09:50:54 -07:00
Emmanuel Garcia
edee1fea58
Add @Keep annotation (#11893) 2019-09-05 13:23:04 -07:00
Shi-Hao Hong
898480fe05
Android 10+ View.getSystemGestureExclusionRects (#11451)
* SystemGesture.getSystemGestureExclusionRects

* Add getSystemExclusionRects unit tests
2019-09-04 15:13:02 -07:00
Matt Carroll
dce8a34048
Revert "Notify framework to clear input connection when app is backgrounded (#35054) (#9498)" (#11720)
This reverts commit 4003fbc3ed48865cf6993d01be60749c3cabeff5.
2019-08-29 15:42:11 -07:00
Shi-Hao Hong
7024722e38
Android 10+ View.setSystemGestureExclusionRects (#11441)
* Implement SystemGesture.setSystemGestureExclusionRects platform channel

* Add PlatformChannelTest.java

* Fix typo in android/test/README.md
2019-08-29 17:00:42 -04:00