596 Commits

Author SHA1 Message Date
Dan Field
88e82d371a
Remove static leaks (#8825) 2019-05-03 16:57:04 -07:00
Matt Carroll
2c9e37c34e
Cause crash in FlutterJNI if invoked on non-main thread (#31263). (#8830) 2019-05-03 14:55:28 -07:00
Dan Field
7ce2666e54
Guard Android logs (#8824) 2019-05-03 14:32:29 -07:00
Dan Field
480844608c
Remove asserts and add BuildConfig (#8821) 2019-05-02 17:30:19 -07:00
Dan Field
39a950e5d1
remove legacy build deps (#8820)
* remove legacy build deps
2019-05-02 16:03:05 -07:00
Matt Carroll
30639ee7b6
Allow FlutterEngine to be used on back-to-back screens (#31264). (#8808) 2019-05-02 13:19:11 -07:00
Kaushik Iska
5aa5b6cbf4
VirtualDisplay size constraint - add a comment explaining the reason (#8780)
* VirtualDisplay size: add a comment explaining the reason

Address nits in: https://github.com/flutter/engine/pull/8704

* remove locale import
2019-04-29 17:19:05 -07:00
Kaushik Iska
7471ddea46
Limit the size of VirtualDisplay we create in android (#8704)
- This can cause phones to restart as documented in https://github.com/flutter/flutter/issues/28978
2019-04-25 13:44:45 -07:00
Chris Bracken
fdd8fdbf40
Fix reflective ctor invocation in FlutterFragment (#8735)
Class.newInstance() propagates any exception thrown by the nullary
constructor, including a checked exception. This effectively bypasses
the compile-time exception checking that would otherwise be performed by
the compiler. The Constructor.newInstance method avoids this problem by
wrapping any exception thrown by the constructor in a (checked)
InvocationTargetException.
2019-04-24 17:50:19 -07:00
Stanislav Baranov
8b5f77630f
Remove support for downloading dynamic patches. (#8663) 2019-04-22 09:05:06 -07:00
Chinmay Garde
1fe3279149
Cleanup references to FLX archives from the engine. (#8653) 2019-04-19 12:49:07 -07:00
Ben Konyi
3e597e1de3
Enable VM service authentication codes by default (#8594) 2019-04-18 14:17:25 -07:00
liyuqian
8ff631f3df
Rename flow namespace to flutter (#8615)
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
2019-04-17 14:38:45 -07:00
Qxyat
28a46d51a0 Composite Embedded Views with the correct GrContext
PaintRecorder Canvases are not associated with GrContexts.
2019-04-16 14:13:34 -07:00
Matt Carroll
23b0e02ec0
Android Embedding PR29: Improve FlutterFragment construction API + engine config API. (#8540) 2019-04-12 13:19:05 -07:00
Chris Bracken
1bb2c0cf06
Remove unused import in FlutterActivityDelegate (#8563)
android.app.UiModeManager is unused in FlutterActivityDelegate.
2019-04-12 11:17:57 -07:00
Matt Carroll
d84d204c76
Android Embedding PR30: Make FlutterView focusable so that the keyboard can interact with it. (#8551) 2019-04-11 13:50:42 -07:00
Matt Carroll
892591da88
Android Embedding PR28: Report app is active to Flutter in FlutterFragment.onResume() instead of onPostResume() forwarded from Activity. (#8536) 2019-04-10 17:47:56 -07:00
Matt Carroll
330c6c168c
Use code cache dir for engine cache on API >= 21 (#14704). (#8534) 2019-04-10 15:32:31 -07:00
Ben Konyi
0a2869e5c3
Added support for authentication codes for the VM service (#8527) 2019-04-10 14:38:58 -07:00
Chinmay Garde
56052c70af
Rename the shell namespace to flutter. (#8520) 2019-04-09 17:10:46 -07:00
Matt Carroll
5279132687
Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions (#8504) 2019-04-09 13:45:25 -07:00
Chinmay Garde
eec74e5c92
Rename the blink namespace to flutter. (#8517)
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
2019-04-09 12:44:42 -07:00
Matt Carroll
dbcfc504cc
Android Embedding PR26: Offer an async version of FlutterMain's ensure initialization complete. (#8465) 2019-04-08 14:46:41 -07:00
Alan Doubleday
075b4899d0 Support ContextWrapper when FlutterView is instantiated within a Fragment. (#7776) 2019-04-08 10:30:36 -07:00
Matt Carroll
d3fbaea9a4
Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (#8460) 2019-04-05 15:59:12 -07:00
Chinmay Garde
424045c3f2
Enable shutting down all root isolates in a VM. (#8457)
This reverts commit 800ea0a40397d53311715e0de94f0340195bfcea.
2019-04-05 13:34:40 -07:00
Matt Carroll
6bc33b5e14
Android Embedding PR24: Allow FlutterActivity to provide an engine, also adjust FlutterFragment timing to avoid Activity launch lag. (#8448) 2019-04-05 13:04:17 -07:00
Chinmay Garde
800ea0a403
Revert "Enable shutting down all root isolates in a VM. (#8402)" (#8431)
This reverts commit b59c4436ce9fb8aa09bad6eb5ca729350a3ab272.
2019-04-03 17:08:56 -07:00
Chinmay Garde
b59c4436ce
Enable shutting down all root isolates in a VM. (#8402) 2019-04-03 15:44:29 -07:00
Chris Bracken
9acdf1837f
Make AccessibilityViewEmbedder final (#8429)
Since this class implements equals() and hashCode() it should either be
final or handle subclasses in equals(); given this is unlikely to be
subclassed, making it final is the simpler option.
2019-04-03 15:06:11 -07:00
Chris Bracken
804d54ddff
Eliminate unused displayBounds parameter (#8427)
Use of this parameter was eliminated in 37947f9.
2019-04-03 14:28:29 -07:00
Amir Hardon
82071e9161
Don't access a11y APIs with reflection starting Android P. (#8393) 2019-03-31 23:21:51 -07:00
Jason Simmons
ca7623eb39
Handle null values in TextInputConfiguration.actionLabel JSON (#8377)
Fixes https://github.com/flutter/flutter/issues/29798
2019-03-29 17:15:04 -07:00
Jason Simmons
71d59cde9e
Check for hover motion events in AndroidTouchProcessor (#8376)
Fixes https://github.com/flutter/flutter/issues/30122
2019-03-29 15:42:11 -07:00
Chinmay Garde
86f4b741b8
Move libdart selection into its own target in //flutter/runtime. (#8373)
Cleanup repeated rules.
2019-03-29 14:29:09 -07:00
Chinmay Garde
a1a2129bc4
GN Format all files in the engine. (#8369) 2019-03-29 12:44:57 -07:00
Jason Simmons
930033d95c
Create a new resource loading EGL context for each PlatformView instance on Android (#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
37947f961a
Allow delegation of a11y events from nodes that were not yet traversed (#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
7620056277
Android Embedding PR22: Polish - FlutterActivity Intent factories, FlutterFragment control of render modes, FlutterSurfaceView transparent until rendering is ready. (#8317) 2019-03-27 14:57:23 -07:00
Amir Hardon
345ae7d373
Delegate a11y events and action to/from embedded Android platform views. (#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
68bd4f2c64
Do not drop the DartExecutor's message handler when a FlutterNativeView is detached from the FlutterView (#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
06635d38a9
Mirror Android platform views a11y tree in the Flutter a11y tree. (#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
28433c513c
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. (#8246) 2019-03-21 13:45:13 -07:00
Jason Simmons
fa435385b6
Use the GPU thread for Android surface on-screen context lifecycle operations (#8234)
Fixes https://github.com/flutter/flutter/issues/29679
2019-03-20 17:43:53 -07:00
Matt Carroll
188adf7e5e
Removed Activity reference from AccessibilityBridge by using a View for insets instead of the Activity (#18115) (#8231) 2019-03-20 14:18:34 -07:00
Amir Hardon
6a8a45fc4f
Have the AccessibilityBridge attach/detach itself to the (#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
1dbd2046b5
Moved io.flutter.embedding.engine.android package to io.flutter.embedding.android (#8221) 2019-03-20 11:30:49 -07:00
Amir Hardon
45f69ac471
Plumb a reference of PlatformViewsController and AccessibilityBridge to each other (#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
b32d0ab982
Bugfix: Prevent crash when responding to a platform message after FlutterJNI detaches from native (#28651). (#8170) 2019-03-14 21:13:03 -07:00