153 Commits

Author SHA1 Message Date
Mehmet Fidanboylu
681ffacfe6 Forward Error objects to uncaught exception handler if there is one. (flutter/engine#21806) 2020-10-16 08:21:04 -07:00
Jason Simmons
190b35170f Call PlatformView.dispose when removing hybrid composition platform views (flutter/engine#21790)
Also force disposal of all hybrid platform views when shutting down the
engine.

Fixes https://github.com/flutter/flutter/issues/66764
2020-10-13 18:40:55 -07:00
Emmanuel Garcia
a36600d4b0 Allow TalkBack navigation while a platform view is rendered (flutter/engine#21719) 2020-10-13 17:52:02 -07:00
Hamdi Kahloun
5ee8b7c5ef SecurityException: Permission Denial (flutter/engine#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
b1839003b3 Extract the WindowInsetsAnimation.Callback subclass into a separate class that will be lazily loaded (flutter/engine#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
f2669455f3 Revert "Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#21163)" (flutter/engine#21513)
This reverts commit afeb9b27f0191997cc45682ab756c0be4d3e155c.
2020-09-30 09:34:05 -07:00
Greg Spencer
afeb9b27f0 Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (flutter/engine#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
Emmanuel Garcia
dbca16555e Support dragging native platform views (flutter/engine#21396) 2020-09-25 17:46:34 -07:00
Gary Qian
e714ae10db Locale -> LanguageRange conversion to be more general in Android platformResolvedLocale (flutter/engine#21350) 2020-09-23 21:52:02 -07:00
Jason Simmons
32fbdb6755 Fix boolean value checks in StandardMessageCodec (flutter/engine#21270)
Fixes https://github.com/flutter/flutter/issues/65619
2020-09-23 16:31:07 -07:00
xster
aa3ac9e9aa Enforce exclusivity for activity and fragments attached to the FlutterEngine (flutter/engine#21272) 2020-09-22 10:34:52 -07:00
Jason Simmons
bc82ee9267 Disconnect the view's AndroidKeyProcessor when detaching from the engine (flutter/engine#21307) 2020-09-21 17:42:02 -07:00
Gary Qian
b2a78b0db5 Remove extraneous window inset call on IME animation (flutter/engine#21213) 2020-09-16 14:04:50 -07:00
Hamdi Kahloun
489c648b42 Fix NPE in PlatformPlugin.getClipboardData() (flutter/engine#21189) 2020-09-15 17:00:57 -07:00
Emmanuel Garcia
3a7b283bb3 Account for current open image in FlutterImageView (flutter/engine#21191) 2020-09-15 14:10:55 -07:00
Gary Qian
cd4ac5d0a3 [Android R] Sync keyboard animation with view insets vs Android 11/R/API 30 WindowInsetsAnimation (flutter/engine#20843) 2020-09-04 02:06:30 -07:00
xster
ed15a009fe Let FlutterActivity/Fragment/FragmentActivity have an app bundle path override instead of eager resolving during construction (flutter/engine#20769) 2020-09-03 17:31:30 -07:00
Gary Qian
a1755b3feb [Android R] Integrate DisplayCutouts into viewportMetrics (flutter/engine#20921) 2020-09-02 05:18:35 -07:00
Emmanuel Garcia
12b8249404 Ensure all images are closed in FlutterImageView (flutter/engine#20842) 2020-09-01 16:57:45 -07:00
Jason Simmons
4bd9085a47 Pass text input key events to the EventResponder if they do not yield characters (flutter/engine#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
xster
7b62a6c11a Add auto plugin registration to FlutterFragmentActivity as well (flutter/engine#20865) 2020-08-31 13:43:46 -07:00
Emmanuel Garcia
2f8279900b Reland: Enable hybrid composition by default on Android (#20722) (flutter/engine#20864)
This reverts commit bb885a23e20d79c163dc884530acaafd6c311f2a.
2020-08-31 12:17:11 -07:00
xster
c09700b409 Add a java injector for testing (flutter/engine#20789) 2020-08-29 22:29:23 -07:00
Greg Spencer
408d2228fa Reland: Implement delayed event synthesis key event handling for Android (flutter/engine#20736)
This re-lands the key event synthesis implementation for Android (Original PR: #19024, Revert PR: #19956). The only difference is sending the synthesized key events to the root view instead of the current view.

Without sending it to the root view, the system doesn't have any chance of handling keys like the back button. The event will still not be sent to the framework twice, since we turn off event propagation while re-dispatching the event.
2020-08-28 14:45:38 -07:00
Jason Simmons
7a38d174d5 Ignore calls to AccessibilityBridge listeners after release (flutter/engine#20701)
AccessibilityBridge installs various listeners for Android events
that invoke Flutter engine APIs.  These listeners are removed in
AccessibilityBridge.release.  However, in some environments there may
be deferred calls to the listener that will still execute even after
the listener has been removed.  This change sets a flag during release
and ignores any listener invocations that happen after the flag is set.

See https://github.com/flutter/flutter/issues/63555 and
https://github.com/flutter/engine/pull/17311
2020-08-27 12:24:33 -07:00
Gary Qian
cfe1db1146 Use Android R (API 30) getInsets() to compute padding (flutter/engine#18339) 2020-08-26 18:15:40 -07:00
Emmanuel Garcia
bb885a23e2 Revert "Enable hybrid composition by default on Android (#20722)" (flutter/engine#20745)
This reverts commit e57e7810a1c62535832abce02393e830fbd7f306.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
e57e7810a1 Enable hybrid composition by default on Android (flutter/engine#20722) 2020-08-24 13:10:23 -07:00
LI DONGZE
38ad113515 Reporting back native stacktrace to dart side for crash reporting. (flutter/engine#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
chunhtai
df10c2b3b4 Missing default focus when navigating to a page with no SemanticsNode that sets namesRoute:true (flutter/engine#20516) 2020-08-19 14:06:03 -07:00
Stas Parshin
fa3e19be27 Fix NPE in PlatformViewsController.checkInputConnectionProxy (flutter/engine#20622) 2020-08-19 08:34:04 -07:00
Emmanuel Garcia
a2732e0538 Reland: Create PlatformView instance right after method channel call from Dart (flutter/engine#20568) 2020-08-17 16:28:15 -07:00
gaaclarke
9ef815d6dc Revert "Create PlatformView instance right after method channel call from Dart (#20500)" (flutter/engine#20564)
This reverts commit a87eaedcc22c1b96065222cdf6a05fe32c0b09f0.
2020-08-17 11:17:03 -07:00
Emmanuel Garcia
a87eaedcc2 Create PlatformView instance right after method channel call from Dart (flutter/engine#20500) 2020-08-14 15:06:02 -07:00
Justin McCandless
1fec9ca767 hasStrings on Android (flutter/engine#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
Mehmet Fidanboylu
0f611fe4b7 Plumbing for setting domain network policy (flutter/engine#20218) 2020-08-13 07:26:43 -07:00
guolinaileen
72bfcbb0e2 Add TextInput performPrivateCommand to Flutter Engine (flutter/engine#20188)
New command for Crowdsource 2/2
2020-08-10 14:04:11 -07:00
Emmanuel Garcia
c2c71dd96a Add FlutterFragmentActivity#getRenderMode() (flutter/engine#20245) 2020-08-07 18:41:01 -07:00
guolinaileen
3c958edb47 Add TextInput sendAppPrivateCommand to Flutter Engine (flutter/engine#20144)
Adds sendAppPrivateCommand for Crowdsource
2020-08-07 17:15:05 -07:00
Emmanuel Garcia
88e65719a4 Wait before switching surfaces (flutter/engine#20100) 2020-07-30 20:36:01 -07:00
LongCatIsLooong
cfb0e1570f Add autofill save for iOS and Android (flutter/engine#18643) 2020-07-28 10:23:55 -07:00
Emmanuel Garcia
b7345a4242 Remove android view from the Mutator stack (flutter/engine#19972) 2020-07-23 10:50:15 -07:00
Greg Spencer
36d1a9f78c Revert "Implement delayed event synthesis key event handling for Android (#19024)" (flutter/engine#19956)
This reverts commit adeb2599ce8c144daef5e77bd25c4da6cae7bc44 because it breaks flutter_gallery__back_button_memory and a customer test.
2020-07-22 12:36:26 -07:00
Emmanuel Garcia
ab12b9a8e6 Support talkback in hybrid composition (flutter/engine#19860) 2020-07-17 18:56:02 -07:00
Greg Spencer
adeb2599ce Implement delayed event synthesis key event handling for Android (flutter/engine#19024)
This implements the design in flutter.dev/go/handling-synchronous-keyboard-events for Android.

I started with Android, but this will be used for all platforms as we add them.

The related framework PR is: flutter/flutter#59358 (which has already landed)
2020-07-17 11:03:19 -07:00
rekire
f425dd713c Prevent that removeActivityResultListener() is causing an ConcurrentModificationException (flutter/engine#19702) 2020-07-15 17:59:08 -07:00
Kaushik Iska
aed2016ee8 [android] Childview will process its motion events (flutter/engine#19662) 2020-07-14 19:18:14 -07:00
Michael Goderbauer
5555b36877 Add flag to indicate whether the platform supports state restoration (flutter/engine#19717) 2020-07-14 11:01:25 -07:00
Gary Qian
d298a08c85 [Android] Prevent FlutterRenderer listener from calling JNI after detach (flutter/engine#19558) 2020-07-13 06:29:30 -07:00
Kaushik Iska
a292cb8d21 [android] Pass synthesized eventType to VirtualDisplay platform views and fix memory leak (flutter/engine#19620) 2020-07-09 18:06:02 -07:00