414 Commits

Author SHA1 Message Date
Ryan Macnak
88aac22299 Reapply "Some cleanups enabled by removing support for Dart 1." (flutter/engine#6216)
- Add missing Dart 2 flags to gen_snapshot invocation.
 - Disable brittle service test.
2018-09-10 17:03:54 -07:00
Ryan Macnak
75e10e3845 Revert "Some cleanups enabled by removing support for Dart. (#5621)" (flutter/engine#6205)
This reverts commit e05d573589bded526e9acf44128e35151d142b7e.
2018-09-07 17:39:51 -07:00
Ryan Macnak
e05d573589 Some cleanups enabled by removing support for Dart. (flutter/engine#5621)
- Switch core snapshot to Dart 2 and remove support for loading platform.dill.
 - Remove support for loading script snapshots.
 - Remove support for loading source.
 - Remove settings and fix names to reflect the above.
 - Remove support for loading the service isolate from source.
2018-09-07 15:44:46 -07:00
Michael Klimushyn
0282e85726 Add transparency helpers to FlutterView.java (flutter/engine#6172)
Fixes #9627
2018-09-05 16:47:02 -07:00
Jason Simmons
8b341d2363 Remove the old location of the ICU data asset (flutter/engine#6170)
The tools are now placing icudtl.dat in the flutter_shared directory.
It is no longer necessary to check for this asset at its previous path.
2018-09-05 12:22:27 -07:00
Simon Lightfoot
7ccb33b1c0 Fixes negative end selection offset. (flutter/engine#6171) 2018-09-05 12:12:21 -07:00
Michael Klimushyn
605c146d02 Enable transparent FlutterViews (flutter/engine#6163)
- Changes rasterizer to clear the canvas with `SkColor_TRANSPARENT`
- Removes the unused `backgroundColor` param from `FlutterView.java`
2018-09-05 10:44:02 -07:00
Jason Simmons
2e2d63b213 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157) 2018-09-05 10:01:33 -07:00
Kirill Nikolaev
fe8d1b47e2 Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
Otherwise the callbacks may be called after FlutterNativeView is destroyed and is null.

Also defensively check for whether the texture is already released in the callback because the callback may be called from another thread by a stale reference (see the comment).

This closes https://github.com/flutter/flutter/issues/20951.
2018-09-04 06:31:01 -07:00
jslavitz
6638f518c6 entering a character with a selection deletes the selection (flutter/engine#6113) 2018-08-30 10:29:04 -07:00
Amir Hardon
dc470dc12a Convert synthesized Android motion events to long and not to int. (flutter/engine#6103) 2018-08-28 12:12:47 -07:00
Jonah Williams
02d928b047 Unconditionally set resource id to empty string (flutter/engine#6096) 2018-08-27 10:54:07 -07:00
amirh
00c385f497 Allow passing extra creation parameters for embedded Android views. (flutter/engine#6081)
This allows plugins to pass extra parameters from the Dart side to the
platform view constructor.
2018-08-24 11:15:14 -07:00
amirh
eb77c3044d Support LTR/RTL layout directions for embedded Android views. (flutter/engine#6057) 2018-08-20 16:22:38 -07:00
amirh
bf9aa07b49 Delay the removal of the onDrawListener. (flutter/engine#6052)
In Android O removing the ViewTreeObserver.onDrawListener from the
listener call crashes. Instead we post a runnable to remove it.
2018-08-20 12:13:26 -07:00
Jonah Williams
8c942fb413 use setContentDescription for controls on Android (flutter/engine#6050) 2018-08-20 09:30:13 -07:00
amirh
31d1346006 Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043)
The default WindowManager implementation in Android's Presentation is
delegating addView/removeView/updateViewLayout calls to the global
WindowManager.
This can result in a crash when an embedded view is trying to e.g show a
PopupWindow.

This change adds a custom WindowManager that overrides
addView (and removeView/updateViewLayout) and adds the view to the
presentation's view tree.

Note that views might keep a reference to the window manager which
might be an issue when we move a view from one virtual display to
another (due to a resize). For this reason when re-sizing we are not
creating a new window manager for the new presentation, but updating the
window manager's references to be relevant for the new presentation and
re-use it.
2018-08-17 17:01:42 -07:00
Martin Kustermann
258a95c9fa Switch all embedders to use platform_strong.dill instead of platform.dill (the flutter_tester binary already does this) (flutter/engine#6024) 2018-08-15 17:45:11 +02:00
Chinmay Garde
33485e47de Fix Android Vulkan builds to account for resource context management API updates. (flutter/engine#6020) 2018-08-14 22:20:05 -07:00
Jason Simmons
c761e6e2a0 Detach the resource context before shutting down the IO thread (flutter/engine#6009) 2018-08-14 13:15:42 -07:00
Stanislav Baranov
b4ce259bcf Fix codepush breakage caused by #5954. (flutter/engine#5996) 2018-08-10 13:23:51 -07:00
amirh
af25774b82 Cast MotionEvent timestamps to Number. (flutter/engine#5994)
Dart might choose to marshall the timestamps to a Java Long or Integer.
Casting directly to int was crashing when the timestamp wass a Long.
2018-08-10 12:46:49 -07:00
Keerti Parthasarathy
96656470a0 Annotate deprecated methods with @Deprecated (flutter/engine#5976) 2018-08-08 13:02:41 -07:00
amirh
8eb80d3e3d Complete the AndroidView resize call only after a new frame is ready. (flutter/engine#5968)
This allows the framework to know that a frame with the resized view is
ready and to behave deterministically to workaround the jank issue
described in flutter/flutter/19572
2018-08-07 18:56:34 -07:00
amirh
9d38d63147 Allow freezing a texture. (flutter/engine#5938)
This is needed to avoid jank when resizing an embedded Android view.
See
https://github.com/flutter/flutter/issues/19572#issuecomment-410400724
2018-08-07 14:43:19 -07:00
Ben Konyi
10e272f154 Persist DartCallbackCache contents across launches (flutter/engine#5947)
* Updated DartCallbackCache to write callback cache to disk which is
restored on engine startup
* Ensure cache isn't moved off disk in iOS
2018-08-07 14:37:19 -07:00
Todd Volkert
21c7a646ca Don't implicitly fall through in switch statement (flutter/engine#5964) 2018-08-07 13:18:26 -07:00
Jonah Williams
3b5e35f4b9 Apply translation to accessibility tree when in landscape (flutter/engine#5950) 2018-08-07 13:09:18 -07:00
Ben Konyi
6d5fce84ae Reland "Updated background execution implementation for Android" (flutter/engine#5954)
* Reland "Updated background execution implementation for Android" w/ JNI fixes for merge breakages

This reverts commit 4a12df930a9d0dc8db3410cd557f35f4a584dbd0.
2018-08-07 12:42:22 -07:00
Alexander Markov
4a12df930a Revert "Updated background execution implementation for Android" (flutter/engine#5949)
This reverts commit e9e6e8a2bf81e394a5903e7cc573644225bf8b95.
2018-08-06 14:10:23 -07:00
Jonah Williams
9d5862edbb Add hasImplicitScrolling SemanticFlag and support in Android bridge (flutter/engine#5941) 2018-08-06 13:57:00 -07:00
Ben Konyi
e9e6e8a2bf Updated background execution implementation for Android 2018-08-06 12:27:57 -07:00
amirh
3cc77fae93 Flush all embedded Android views on hot restart. (flutter/engine#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
c5dfa3a45c Don't drop MotionEvents with unknown tool type. (flutter/engine#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
Michael Goderbauer
53e707207e Switch to minimal ICU data config for flutter (flutter/engine#5922) 2018-08-01 17:24:07 -07:00
Jonah Williams
3a3f6ca0ee Initial support for more finely-grained a11y features on Window (flutter/engine#5901) 2018-07-31 18:18:19 -07:00
Jonah Williams
7fe563529c Add word movement granularities to android (flutter/engine#5902) 2018-07-30 17:53:17 -07:00
Jason Simmons
332832d84c Clear the EGL context only if our context is currently active (flutter/engine#5895)
Fixes https://github.com/flutter/flutter/issues/19566
2018-07-30 09:52:39 -07:00
amirh
30940056b0 Fix wrong conversion of MotionEvent to Flutter's PointerEvent kind. (flutter/engine#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
b3b626547f Log uncaught exceptions from JNI calls at a higher priority (flutter/engine#5891) 2018-07-27 14:33:44 -07:00
Chinmay Garde
6ab2c166fd Remove all dependencies on Garnet. (flutter/engine#5869) 2018-07-26 12:49:34 -07:00
Stanislav Baranov
e5b0a15bce Support hot reload in corejit mode (flutter/engine#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
4cf4ffab2e Support customizing standard accessibility actions on Android. (flutter/engine#5823) 2018-07-25 15:26:02 -07:00
Amir Hardon
90d63afdeb 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
30562c503e 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
b2d92b2c9f Make the virtual display's presentation window non focusable. (flutter/engine#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
Jonah Williams
6526a25097 Semantics framework updates (flutter/engine#5601) 2018-07-20 11:17:59 -07:00
Joshua Seaton
967a473c6d [fml][fxl] Migrate AutoResetWaitableEvent to fml version. (flutter/engine#5808)
Thanks Jason for the speedy review
2018-07-20 10:12:38 -07:00
Jonah Williams
0c14fd36af add text capitalization support to ios and android (flutter/engine#5752) 2018-07-19 18:07:18 -07:00
Stanislav Baranov
19219f9693 Fix starting isolate directly from CoreJIT snapshot. (flutter/engine#5798) 2018-07-19 08:55:04 -07:00