763 Commits

Author SHA1 Message Date
Ben Konyi
bc885f319b
Updated background execution implementation for Android 2018-08-06 12:27:57 -07:00
amirh
ffbafc852d
Flush all embedded Android views on hot restart. (#5929)
* Flush all embedded Android view on hot restart.

Adds an OnEngineRestarted method to PlatformView, this is currently only
implemented for Android where we need to use it for embedded views.

* review comments followup

* rename to OnPreEngineRestart, call before Clone
2018-08-03 08:54:12 -07:00
amirh
3b66f20d96
Don't drop MotionEvents with unknown tool type. (#5931)
Instead, send them with the new unknown PointerDeviceKind.

We hit this when running `adb shell input tap` in tests which sends events with
an unknown tool type.

This also fills in a missing conversion for TOOL_TYPE_ERASER.
2018-08-02 16:05:55 -07:00
James D. Lin
76ec93dabf
Add an explicit -[FlutterViewController init] implementation (#5924)
* Add an explicit `-[FlutterViewController init]` implementation

`-[FlutterViewController init]` currently works because it inherits
the `-[UIViewController init]` convenience initializer that invokes
the `-[UIViewController initWithNibName:bundle:]` designated
initializer that `FlutterViewController` overrides.

However, this doesn't seem to be explicitly documented, so it's a bit
confusing (or at least non-obvious), and it seems potentially
brittle.  Add an explicit implementation of `-[FlutterViewController
init]` instead.
2018-08-02 14:03:42 -07:00
Michael Goderbauer
a76054f4b6
Switch to minimal ICU data config for flutter (#5922) 2018-08-01 17:24:07 -07:00
Jonah Williams
dcd2956f88
Initial support for more finely-grained a11y features on Window (#5901) 2018-07-31 18:18:19 -07:00
James D. Lin
d06e9e84d0 Deprecate -[FlutterDartProject initFromDefaultSourceForConfiguration] (#18886) (#5858)
* Deprecate -[FlutterDartProject initFromDefaultSourceForConfiguration] (#18886)

`-[FlutterDartProject initFromDefaultSourceForConfiguration]` no
longer seems very useful.  It calls `-initWithPrecompiledDartBundle:`
or `-initWithFlutterAssets:dartMain:packages:`, but since it now
passes `nil` for all arguments, both paths end up doing the same
thing.

Additionally, `-initFromDefaultSourceForConfiguration` is awkward to
use in Swift.  The automatically generated Swift interface is:

    public convenience init!(fromDefaultSourceForConfiguration: ())

and it's not obvious how to call that.

Let's deprecate `-initFromDefaultSourceForConfiguration` and instead
expect callers to use the existing `-init` method. (We can make
`-init` do different things for different build configurations later
if necessary.)

Bonus: Rename some parameters to make it more obvious when they may
be `nil`.
2018-07-31 11:49:57 -07:00
Jonah Williams
236d633a49
Add word movement granularities to android (#5902) 2018-07-30 17:53:17 -07:00
nathanrogersgoogle
0c8fda2708
Remove the "VSYNC" trace event on Fuchsia (#5907)
Don't emit a "VSYNC" event when running on Fuchsia, as traces on Fuchsia
are typically recorded across the whole system, causing the events to
collide with each other.
2018-07-30 15:40:41 -07:00
Jason Simmons
46b77937b3
Clear the EGL context only if our context is currently active (#5895)
Fixes https://github.com/flutter/flutter/issues/19566
2018-07-30 09:52:39 -07:00
Jason Simmons
2f4a02204f
Return proper JSON-RPC error responses from service protocol failures (#5889)
Fixes https://github.com/flutter/flutter/issues/19571
2018-07-30 09:52:12 -07:00
amirh
5da006472c
Fix wrong conversion of MotionEvent to Flutter's PointerEvent kind. (#5894)
We were sending the toolType values as-is which is wrong, e.g touch
events showed in Flutter as mouse events.
2018-07-27 16:12:26 -07:00
Jason Simmons
f9f40badde
Log uncaught exceptions from JNI calls at a higher priority (#5891) 2018-07-27 14:33:44 -07:00
mikejurka
89602cc647
[scenic] Expose compositor context from rasterizer. (#5739)
Needed by code to support Scenic's new API for views.
2018-07-26 21:46:07 -07:00
Chinmay Garde
9f8285ac6c
Remove all dependencies on Garnet. (#5869) 2018-07-26 12:49:34 -07:00
Stanislav Baranov
f480e32347
Support hot reload in corejit mode (#5866)
Since frontend_server --incremental doesn't support --link-platform, instead of baking host app into the snapshot, load it from kernel file when running in debug mode.
2018-07-26 08:52:19 -07:00
Jonah Williams
d559afb320
Support customizing standard accessibility actions on Android. (#5823) 2018-07-25 15:26:02 -07:00
Chinmay Garde
228cecc293
Make //flutter/synchronization Garnet free. (#5865) 2018-07-25 14:30:41 -07:00
Chinmay Garde
336c23f846
Remove //flutter/glue and use FML directly. (#5862) 2018-07-25 13:20:48 -07:00
Amir Hardon
d2d8bf3941 Pass touch events to embedded Android views with dispatchTouchEvents.
Was previously calling onTouchEvent directly which doesn't make the
event go through the full pipeline (e.g onInterceptTouchEvent is not
called).
2018-07-25 12:21:51 -07:00
Amir Hardon
2169086529 Synthesize Android MotionEvents with the long form obtain method.
The simple form MotionEvent.obtain method I used before does not allow
to synthesize multi pointer events.
2018-07-25 12:21:51 -07:00
amirh
42bd86d6db
Make the virtual display's presentation window non focusable. (#5845)
When the FlutterView's window loses focus Flutter cannot bring up the
keyboard (so e.g tapping on text fields doesn't work).

This workaround makes sure that Flutter text fields are working but
unfortunately now the embedded Android view cannot bring up the keyboard
as it's window is not focused.

Submitting this until as a stop gap while we're trying to figure out if
it's possible to allow both windows to bring up the keyboard.
2018-07-25 08:51:56 -07:00
Jason Simmons
0bad812c72
Migrate to a standalone Tonic repository separated from Topaz (#5817) 2018-07-23 11:49:35 -07:00
Jonah Williams
96f5f5b96c
Semantics framework updates (#5601) 2018-07-20 11:17:59 -07:00
Joshua Seaton
663b4925b8
[fml][fxl] Migrate AutoResetWaitableEvent to fml version. (#5808)
Thanks Jason for the speedy review
2018-07-20 10:12:38 -07:00
Jonah Williams
d1c71e5206
add text capitalization support to ios and android (#5752) 2018-07-19 18:07:18 -07:00
Stanislav Baranov
5d0e13a45b
Fix starting isolate directly from CoreJIT snapshot. (#5798) 2018-07-19 08:55:04 -07:00
Jonah Williams
55b423f07f
Ensure assistiveTechnologyEnabled is initialized when the android view is set up (#5793) 2018-07-18 15:32:38 -07:00
amirh
3054f31837
Add touch events to the platform views method channel API. (#5796) 2018-07-18 15:20:59 -07:00
Jonah Williams
5557e3006e
Fix allocation of JNI byte buffer on API level 22 and below (#5788) 2018-07-17 11:58:42 -07:00
Michael Goderbauer
e02bd92479
Roll buildroot to 7b5fd64b26afe194fa49463bad204b2cfba47fb6 (#5769) 2018-07-16 13:23:58 -07:00
Jason Simmons
316b026807
Handle Android vsync callbacks that occur after the VsyncWaiter has been deleted (#5749)
Fixes https://github.com/flutter/flutter/issues/19159
2018-07-16 12:04:05 -07:00
Jonah Williams
2e57ecd38f
Revert rollback of "add assistiveTechnologyEnabled to window" (#5750) 2018-07-16 09:04:20 -07:00
Jonah Williams
e632fb8160
Expose keyboardAppearance field in iOS FlutterTextInputPlugin.mm (#5714) 2018-07-13 19:59:59 -07:00
Jonah Williams
9af920ef22 Revert "Add assistiveTechnologyEnabled flag to window" (#5746)
Reverts flutter/engine#5740
2018-07-13 15:55:49 -07:00
amirh
80a85e4a17
Implement PlatformViewsController. (#5722)
Each platform view created (by a plugin supplied factory) is attached to
a virtual display.
The virtual displays are controlled by VirtualDisplayController objects.
The PlatformViewsController maintains a mapping from a platform view's
id to its VirtualDisplayController, which allows it to operate on the
virtual display for a given platform view ID when asked so over the
method channel.

This is using API level 20 APIs, on lower API levels all platform views
method channel calls are noops.
We can make this work on API 19 with some refactoring to the
TextureRegistry (allow the engine Java code to recycle a texture entry
id).

This CL also adds a platform view id parameter to the
PlatformViewFactory#create() method. This allows plugins to route
platform channel messages to specific instances of a platform view.

TBD in future CLs:
  * Forward touch events to the platform views.
  * Support accessibility for platform views.

flutter/flutter#19030
2018-07-13 14:08:24 -07:00
Jonah Williams
9ece2752aa
Add assistiveTechnologyEnabled flag to window (#5740) 2018-07-13 13:47:31 -07:00
Ben Konyi
672e587e74
Background Execution Implementation for iOS (#5539) 2018-07-13 10:55:24 -07:00
amirh
4d490275f7
gitignore intellij generated folder (#5729) 2018-07-13 09:23:43 -07:00
Jonah Williams
c5a63d28bf
rollback chrome change (#5721) 2018-07-11 15:28:33 -07:00
amirh
68d81a31f4
Platform Views: Android and MethodChannel APIs, and implementation skeleton. (#5684)
To keep the scope of this CL as small of possible I'm leaving the actual
implementation of the platform view mechanics to a following CL.

This CL introduces:
  * A PlatformViewsController class which will be responsible for creating,
    resizing, and disposing platform views.
  * A PlatformViewRegistry which is exposed through the PluginRegistry
    and allows plugins to register factories for platform views.

Android plugin code will add support for a new platform view type by
implementing PlatformViewFactory, and registering a factory with the
registry, e.g:
```java
registrar.platformViewRegistry().registerViewFactory(
  'webview',
  new FlutterWebViewFactory()
);
```
On the Dart side, the framework will ask the engine to create new
platform views by sending a create message over the platformviews method
channel with the unique platform view type id, dimensions, and a unique
id allocated by the framework for the new platform view instance.
The platformviews method channel is also used for resizing and disposing
platform views.
2018-07-11 14:11:15 -07:00
Jonah Williams
48d6e1f891
Custom accessibility (local context) action support for iOS and Android. (#5597) 2018-07-11 10:27:50 -07:00
Jonah Williams
e89d843497
Swap definitions of SystemChrome apis to match iOS (requires framework change when rolling) (#5609) 2018-07-10 17:36:31 -07:00
Jonah Williams
d5fce84be8
revert change to app delegate that wont build on earlier xcodes (#5702) 2018-07-09 15:22:25 -07:00
Jonah Williams
d217a95126
Remove cullRect calculation on TransformLayers with a perspective transform. (#5693) 2018-07-09 12:52:10 -07:00
Jonah Williams
5724faf86e
ensure that bridge is not destroyed when semantics is still enabled (#5672) 2018-07-03 22:25:40 -07:00
Jason Simmons
d085f1df2c
Do not make an extra submit callback during SurfaceFrame destruction if the frame was already submitted (#5669) 2018-07-03 17:17:57 -07:00
amirh
51785d244d
Remove unused Java imports (#5663) 2018-07-03 09:21:03 -07:00
matthew-carroll
061e899b55
Support all keyboard actions. (#11344) (#5620)
* Support all keyboard actions. (#11344)
2018-07-02 06:58:01 +00:00
Jonah Williams
ce06bbac58
ensure a11y state is communicated back to flutter (#5631) 2018-06-28 13:30:51 -07:00