281 Commits

Author SHA1 Message Date
Dan Field
48687ca3ca
Forbid android.util.Log (#21696) 2020-10-08 14:52:05 -07:00
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
xster
caa8e6dd9f
Re-land deprecate Android v1 embedding classes (#21347) 2020-09-23 11:25:20 -07:00
Jason Simmons
034ab2e18e
Retain the WindowInsetsAnimation callback if code shrinking is enabled (#21330) 2020-09-23 09:17:02 -07:00
Zachary Anderson
c62d665299
Revert "Deprecate Android v1 embedding classes (#20868)" (#21338)
This reverts commit 3011b14a25ea5c9fd54ecffc2e154e587c4a6b1a.
2020-09-22 14:38:18 -07:00
xster
88e53777d1
Enforce exclusivity for activity and fragments attached to the FlutterEngine (#21272) 2020-09-22 10:34:52 -07:00
xster
3011b14a25
Deprecate Android v1 embedding classes (#20868) 2020-09-21 15:02:02 -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
Greg Spencer
88fd13fcd3
Reland: Implement delayed event synthesis key event handling for Android (#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
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
Jia Hao
9c99bf7587
Add missing nullable annotation (#20505) 2020-08-13 22:41:01 -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
Greg Spencer
18200e7e8e
Revert "Implement delayed event synthesis key event handling for Android (#19024)" (#19956)
This reverts commit 8825f9178d884d07b43590ef52bb929ac9a3773f because it breaks flutter_gallery__back_button_memory and a customer test.
2020-07-22 12:36:26 -07:00
Emmanuel Garcia
12847e899e
Support talkback in hybrid composition (#19860) 2020-07-17 18:56:02 -07:00
Greg Spencer
8825f9178d
Implement delayed event synthesis key event handling for Android (#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
Tong Mu
fbef051f5c
Add all system cursors (engine) (#19550)
* Support all system cursors in WIn, Linux, mac, Web and Android.
2020-07-15 15:37:18 -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
Kaushik Iska
40d3f7c64e
Propoagate Tap events on Android hybrid views (#19608)
Translate the coordinate from global flutterview to the specific embedded sub-view.
2020-07-08 13:19:17 -07:00
Kaushik Iska
110a57983b
Track motion events for reuse post gesture disambiguation (#19484)
This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in https://github.com/flutter/flutter/pull/60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: https://github.com/flutter/flutter/issues/58837
2020-07-06 22:22:37 -07:00
Emmanuel Garcia
d1f3037c4c
Switch to FlutterSurfaceView if no Android view is in the frame (#19487) 2020-07-06 14:51:46 -07:00
Chris Yang
cc9ccf98ae
Implement mutator stack on Android hybrid composition platform view (#19426) 2020-07-04 13:03:04 -07:00
Kaushik Iska
f8bbcc396b
Synthesize touch events for hybrid views (#19427)
Co-authored-by: Kaushik Iska <kaushikiska@google.com>
2020-07-02 12:31:30 -07:00
Emmanuel Garcia
6e1f795f87
Revert unintended change (#19435) 2020-06-30 19:48:01 -07:00
Emmanuel Garcia
0e82628caf
Update scenario UI screenshoots (#19421) 2020-06-30 18:38:06 -07:00
Jason Simmons
2dc202d823
Basic support for resizing overlay surfaces in hybrid composition (#19402) 2020-06-30 14:08:04 -07:00
Emmanuel Garcia
a28b7f0f37
Implement onDisplayPlatformView (#19344) 2020-06-26 21:08:02 -07:00
Emmanuel Garcia
c332675a8c
Fix hybrid composition bugs (#19325) 2020-06-26 12:33:02 -07:00
Jason Simmons
b3b1f4351a
Fix ImageReader "unable to acquire a buffer item" warnings in FlutterImageView (#19319) 2020-06-26 11:18:03 -07:00
Gary Qian
559d93d978
Android native locale resolution algorithm (#19266) 2020-06-26 02:48:33 -07:00
Jason Simmons
2b74e8ae8c
Position overlay layer views in PlatformViewsController.onDisplayOverlaySurface (#19295) 2020-06-24 20:48:38 -07:00
Jason Simmons
0c14126211
Initial work toward converting the FlutterView to use a FlutterImageView on demand (#19279) 2020-06-24 16:26:03 -07:00