565 Commits

Author SHA1 Message Date
Chris Bracken
df39681b8c Eliminate unused displayBounds parameter (flutter/engine#8427)
Use of this parameter was eliminated in 2f36f15.
2019-04-03 14:28:29 -07:00
Amir Hardon
db5e2e9492 Don't access a11y APIs with reflection starting Android P. (flutter/engine#8393) 2019-03-31 23:21:51 -07:00
Jason Simmons
7bdf7064c4 Handle null values in TextInputConfiguration.actionLabel JSON (flutter/engine#8377)
Fixes https://github.com/flutter/flutter/issues/29798
2019-03-29 17:15:04 -07:00
Jason Simmons
ec6b6a1317 Check for hover motion events in AndroidTouchProcessor (flutter/engine#8376)
Fixes https://github.com/flutter/flutter/issues/30122
2019-03-29 15:42:11 -07:00
Chinmay Garde
9a54dbc65a Move libdart selection into its own target in //flutter/runtime. (flutter/engine#8373)
Cleanup repeated rules.
2019-03-29 14:29:09 -07:00
Chinmay Garde
1a7c5d7bf3 GN Format all files in the engine. (flutter/engine#8369) 2019-03-29 12:44:57 -07:00
Jason Simmons
04ca9a5cb5 Create a new resource loading EGL context for each PlatformView instance on Android (flutter/engine#8330)
Using one global resource loading context will fail if two PlatformViews are
running concurrently with two different IO threads.
2019-03-28 11:33:56 -07:00
Amir Hardon
2f36f159f1 Allow delegation of a11y events from nodes that were not yet traversed (flutter/engine#8333)
The AccessibilityViewEmbedder was not delegating a11y events coming virtual nodes(of the embedded view) that were not previously traversed by the a11y framework.

It turns out the a11y framework might leave parts of the tree untraversed in some circumstances, changed the behavior to create an originId<-->flutterId mapping on the fly when an event is delegated from a not previously traversed node.

Fixes flutter/flutter#30010.
2019-03-27 15:49:15 -07:00
Matt Carroll
87ff155831 Android Embedding PR22: Polish - FlutterActivity Intent factories, FlutterFragment control of render modes, FlutterSurfaceView transparent until rendering is ready. (flutter/engine#8317) 2019-03-27 14:57:23 -07:00
Amir Hardon
968cefaef1 Delegate a11y events and action to/from embedded Android platform views. (flutter/engine#8250)
Delegate a11y events and action to/from embedded Android platfrom views.

This handles delegation of:
  * AccessibilityNodeProvider#performAction
  * ViewGroup#requestSendAccessibilityEvent
  * View#onHoverEvent

Additionally updates the currently input accessibility focused node state that is
tracked by the a11y bridge when an embedded view's node is focused.
2019-03-25 14:26:49 -07:00
Jason Simmons
7405924bf1 Do not drop the DartExecutor's message handler when a FlutterNativeView is detached from the FlutterView (flutter/engine#8254)
An activity can use ViewFactory.retainNativeFlutterView to reuse a
FlutterNativeView across multiple instances of the activity.  In this
scenario, the FlutterNativeView should continue to handle incoming messages
sent from Dart.
2019-03-21 18:08:58 -07:00
Amir Hardon
199310695f Mirror Android platform views a11y tree in the Flutter a11y tree. (flutter/engine#8237)
This PR mirrors virtual a11y tree of embedded platform views in the Flutter
a11y tree.

Non virtual hierarchies are not currently supported.

Only works on Android versions earlier than Android P as it relies on
reflection access to hidden system APIs which cannot be done starting
Android P.

A11y is not yet working as we also need to delegate a11y events from the
platform view to the FlutterView. This will be done in a following PR to
keep the change size a little saner.
2019-03-21 15:26:44 -07:00
Matt Carroll
c802d6ce22 FlutterJNI no longer asserts it is attached when dispatching platform messages and instead fizzles with a warning if not attached. Not sure what root cause of issue is, but this is necessary to avoid crashes. (flutter/engine#8246) 2019-03-21 13:45:13 -07:00
Jason Simmons
18437bef89 Use the GPU thread for Android surface on-screen context lifecycle operations (flutter/engine#8234)
Fixes https://github.com/flutter/flutter/issues/29679
2019-03-20 17:43:53 -07:00
Matt Carroll
752939347e Removed Activity reference from AccessibilityBridge by using a View for insets instead of the Activity (#18115) (flutter/engine#8231) 2019-03-20 14:18:34 -07:00
Amir Hardon
f537b10fe8 Have the AccessibilityBridge attach/detach itself to the (flutter/engine#8229)
PlatformViewsDelegate.

Since onDetachedFromWindow can be called after the activity was
destroyed, the previous call to detach the accessibility bridge could
have crash as the NativeFlutterView was already null.
2019-03-20 12:26:30 -07:00
Matt Carroll
23bfa08262 Moved io.flutter.embedding.engine.android package to io.flutter.embedding.android (flutter/engine#8221) 2019-03-20 11:30:49 -07:00
Amir Hardon
06a23ac247 Plumb a reference of PlatformViewsController and AccessibilityBridge to each other (flutter/engine#8208)
This is in preparation for implementing platform views a11y on Android.

And e2e working prototype is available here: https://github.com/amirh/engine/tree/a11y_hacks

flutter/flutter#19418
2019-03-19 15:48:45 -07:00
Matt Carroll
95c350dcd2 Bugfix: Prevent crash when responding to a platform message after FlutterJNI detaches from native (#28651). (flutter/engine#8170) 2019-03-14 21:13:03 -07:00
Matt Carroll
8aeb94ed24 Android Embedding PR 19: Add accessibility to new FlutterView. (flutter/engine#8109) 2019-03-14 14:24:49 -07:00
liyuqian
c267787209 Add dump-shader-skp switch to help ShaderWarmUp (flutter/engine#8148)
Allow Flutter to automatically dump the skp that triggers new shader compilations. This is useful for writing custom ShaderWarmUp to reduce jank. By default, it's not enabled to reduce the overhead. This is only available in profile or debug build.

Later, we can add service protocol support to pull the skp from the client to the host. Currently, it works fine for Android-based devices (including our urgent internal clients) where we can `adb shell` into the cache directory.
2019-03-14 12:58:09 -07:00
Jason Simmons
ff7d13c6ed Suppress deprecation warning for use of Build.CPU_ABI (flutter/engine#8154) 2019-03-13 14:36:35 -07:00
Jason Simmons
c204de1fde Encode scroll motion events in the Android touch processor (flutter/engine#8149) 2019-03-13 11:30:42 -07:00
Jason Simmons
ee38cddf85 Look up ICU symbols based on the path to libflutter.so as a fallback (flutter/engine#8139)
The ICU data is packaged within libflutter.so, and the engine uses
dlsym(RTLD_DEFAULT) to look up the ICU data symbols in the libraries
loaded by the process.

This approach apparently fails on some Xiaomi devices.  If RTLD_DEFAULT
can not find the symbols, then the platform will pass the path to the
libflutter.so library so the engine can use that to resolve the symbols.

Fixes https://github.com/flutter/flutter/issues/28208
2019-03-12 18:33:33 -07:00
Matt Carroll
53f65f1bf1 Bugfix #29203: NPE in getAccessibilityProvider in old FlutterView. (flutter/engine#8126) 2019-03-11 23:45:03 -07:00
Matt Carroll
e8b329d24b Integrated AndroidTouchProcessor within the old FlutterView (flutter/engine#8095) 2019-03-11 16:04:44 -07:00
Michael Goderbauer
40e0467f60 Adds a platfromViewId to SemanticsNode (flutter/engine#8055) 2019-03-11 11:30:35 -07:00
Jonah Williams
37f8c39523 Guard initialization of touch exploration listener (flutter/engine#8103) 2019-03-09 15:07:26 -08:00
Matt Carroll
af6deb0357 Android Embedding PR 17: Clarify AccessibilityBridge and move logic out of FlutterView. (flutter/engine#8061) 2019-03-08 18:09:04 -08:00
Matt Carroll
d29f5a6f87 Android Embedding PR 16: Add touch support to FlutterView. (flutter/engine#8034) 2019-03-08 18:08:26 -08:00
Michael Klimushyn
3bf53be79c Guard against NewAPI failures (flutter/engine#8048)
Adds minimum SDK checks around minimum APIs.

flutter/flutter#28848
2019-03-08 13:33:58 -08:00
Jonah Williams
4996907fe5 Revert "add signal to pointer kinds" (flutter/engine#8066) 2019-03-06 20:55:34 -08:00
stuartmorgan
5745c57f0c Add engine support for scrollwheel events (flutter/engine#7494)
Adds support for pointer signals, in a way that will support both discrete events (e.g., scroll wheels, flutter/flutter#22762) and continuous gestures (e.g., trackpad scroll, flutter/flutter#21953).

Also exposes these new event options to the embedder. Does not include code to send the
new events from the platform shells.
2019-03-05 14:12:07 -08:00
Matt Carroll
f24fe312b8 Android Embedding PR 14: Almost done with FlutterFragment. (flutter/engine#8000) 2019-03-04 18:02:24 -08:00
Matt Carroll
8f11547f61 Android Embedding PR15: Add Viewport Metrics to FlutterView (flutter/engine#8029) 2019-03-04 17:12:52 -08:00
Dan Field
9383838e9f Start of linting Android embedding (flutter/engine#8023)
* Add a tool for running Android SDK lint on Android embedding
2019-03-04 13:55:53 -08:00
Greg Spencer
55f7ab72d8 Guard against using Android API not defined in API level 16 & 17 (flutter/engine#8006)
This adds a guard around the call to MotionEvent.isFromSource, which is not implemented in API 16 and 17.

Fixes flutter/flutter#28640
2019-03-01 14:53:22 -08:00
Matt Carroll
0f8d5d618b Android Embedding PR 12: Add lifecycle methods to FlutterActivity. (flutter/engine#7974) 2019-02-28 16:51:17 -08:00
Matt Carroll
15584ba38d Android Embedding PR 13: Integrated text input, keyevent input, and some other channel comms in FlutterView. (flutter/engine#7979) 2019-02-28 15:02:56 -08:00
Matt Carroll
a0f16c7b4a Android Embedding PR 9: Introduce an AndroidTouchProcessor to convert MotionEvents to Flutter touch data. (flutter/engine#7947) 2019-02-28 14:44:28 -08:00
Matt Carroll
73e65066f2 Android Embedding PR 11: Add FlutterEngine to FlutterFragment. (flutter/engine#7972) 2019-02-27 21:09:28 -08:00
Jason Simmons
906d49c751 Check for a null pressure range for motion events (flutter/engine#7986)
Fixes https://github.com/flutter/flutter/issues/28490
2019-02-27 11:27:19 -08:00
Matt Carroll
31890e2d9f Android Embedding PR 10: Add system channels to FlutterEngine. (flutter/engine#7960) 2019-02-26 19:05:18 -08:00
Jason Simmons
930fcb8c2a Suppress deprecation warning for usage of Configuration.locale (flutter/engine#7973) 2019-02-26 17:03:10 -08:00
Ben Konyi
0669ddc849 Link dart:* sources into engine for debugger source support (flutter/engine#7908)
Link dart:* sources into engine for debugger source support

Currently, dart:* libraries appear to have no source in
debuggers like Observatory. With this change, these sources will be
available in debug mode applications. Sources for dart:* libraries are
lazily loaded on a script-by-script basis.

Refer to https://dart-review.googlesource.com/c/sdk/+/93375 for the Dart
SDK change.
2019-02-26 13:28:04 -08:00
Gary Qian
e89ce5c33f Add api 21 check to LocalizationChannel.java (flutter/engine#7967) 2019-02-26 11:33:07 -08:00
Matt Carroll
6245708521 Android Embedding PR 8: Add FlutterEngine attachment/detachment to FlutterView (flutter/engine#7946) 2019-02-26 01:54:17 -08:00
Matt Carroll
e58bcfa1aa Android PR 7: Introduce structure of FlutterActivity and FlutterFragment (flutter/engine#7912) 2019-02-26 01:48:09 -08:00
Matt Carroll
022526592f Fixed an Android keyboard entry bug that was introduced by the embedding refactor. (#28438) (flutter/engine#7954) 2019-02-25 19:15:49 -08:00
Jason Simmons
153bf88d71 Do not clear FlutterJNI state when a FlutterView is detached (flutter/engine#7929)
If an app is using retainFlutterNativeView or a plugin wants to keep the
FlutterNativeView active, then the FlutterNativeView should not drop its
handle to the corresponding native platform view.

Fixes https://github.com/flutter/flutter/issues/26931
2019-02-25 15:31:50 -08:00