1124 Commits

Author SHA1 Message Date
Jonah Williams
4e54bc93ca
Guard initialization of touch exploration listener (#8103) 2019-03-09 15:07:26 -08:00
Dan Field
dc216bdcf0
Fix typo (#8102)
programatically -> programmatically
2019-03-09 08:58:07 -08:00
Chinmay Garde
03d5f3c2d1
Clarify arguments to FlutterEngineOnVsync (#8093) 2019-03-08 18:09:17 -08:00
Matt Carroll
718329ce6e
Android Embedding PR 17: Clarify AccessibilityBridge and move logic out of FlutterView. (#8061) 2019-03-08 18:09:04 -08:00
Matt Carroll
edfc0cfaaf
Android Embedding PR 16: Add touch support to FlutterView. (#8034) 2019-03-08 18:08:26 -08:00
Chinmay Garde
3c8ef04e91
Allow embedders to post tasks onto the render thread. (#8089)
Some embedders may have to wait on fences asynchronously before committing
contents. This allows them to post a task onto the engine managed thread used
for rendering.
2019-03-08 16:30:48 -08:00
Michael Klimushyn
1d10e0eb67
Guard against NewAPI failures (#8048)
Adds minimum SDK checks around minimum APIs.

flutter/flutter#28848
2019-03-08 13:33:58 -08:00
liyuqian
87edd94e9c
Add read-only persistent cache (#8049)
Some clients (e.g., embedded devices) prefer generating persistent cache files for the specific device beforehand, and ship them as readonly files in OTA packages.
2019-03-08 12:15:45 -08:00
Core
260669c65e Fix deleting text when the last character is some special characters on IOS (#7982) 2019-03-08 10:47:06 -08:00
Chris Bracken
a48cd16e07
Update a11y word forward/back enum names (#8073)
This updates the FlutterSemanticsAction enumerator identifiers for the
'move cursor forward/back one word' actions (added in
flutter/engine#8033) for consistency with the 'move cusor forward/back
on character' identifiers.

ABI compatibility is unaffected, but this with require the following
change in any embedder making use of these fields:

Rename:
    kFlutterSemanticsActionMoveCursorForwardByWordIndex
to:
    kFlutterSemanticsActionMoveCursorForwardByWord

Rename:
    kFlutterSemanticsActionMoveCursorBackwardByWordIndex
to:
    kFlutterSemanticsActionMoveCursorBackwardByWord
2019-03-07 16:46:44 -08:00
Chinmay Garde
b5f59ed89d Delay the vsync callback till the frame start time specified by embedder. (#8072)
The current assumption is that the embedder will wait till the vsync event and
then fire the callback. However, some embedders have that information upfront.
Since the time point has already been specified by the embedder, there is no
reason to burden the embedder with having to setup a wait either.
2019-03-07 16:28:22 -08:00
Dan Field
7426305f5d
Mark const extern (#8077)
* Mark const extern

* fix build
2019-03-07 16:10:03 -08:00
Jonah Williams
ca0bac4fb0
Revert "add signal to pointer kinds" (#8066) 2019-03-06 20:55:34 -08:00
Dan Field
a93d99db98
A11y callback (#8005)
* implement callback for a11y readiness
* use FlutterSemanticsUpdateNotification from header, move to VC header
2019-03-06 16:53:14 -08:00
Gary Qian
3661d5e43b
Re-land "Buffer lifecycle in WindowData" (#8032) 2019-03-06 15:38:34 -08:00
stuartmorgan
471a2c89a6
Send scroll events from the macOS shell (#8056)
Adds scroll event handling to the macOS shell, sending them using the
new embedding API.

Currently, trackpad scrolling is just handled like scrollwheel
scrolling, since the trackpad-gesture-based scroll handling in Flutter
is still in progress.

Adds code to synthesize Add events if mouse tracking isn't enabled,
so that it doesn't rely on Flutter being lenient about handling events
from pointers that have never been added.
2019-03-06 13:15:01 -08:00
Chinmay Garde
e37bd27b48
Fix weak pointer use violations in shell and platform view. (#8046) 2019-03-05 15:21:06 -08:00
stuartmorgan
dd80fc9ff6
Add engine support for scrollwheel events (#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
Chris Yang
effee2f80e
remove extra statement (#8041)
Remove an extra statement introduced in 36ca5740c7
2019-03-05 11:12:00 -08:00
Chris Bracken
e6a5201f0b
Add missing values to semantics action enums (#8033)
This brings the Dart and C++ semantics flag enums back in sync.

In #5902, the ability to move the cursor forward and backward one word
were added to dart:ui, and to the Android embedder, but not to the
SemanticsAction enum on the C++ side.
2019-03-05 07:58:26 -08:00
Chris Bracken
ed628da00a
Add missing kHasImplicitScrolling enum value (#8030)
This brings the Dart and C++ semantics flag enums back in sync.

In #5941, implicit scrolling support was added to SemanticsFlag in
dart:ui, and to the Android embedder, but not to the SemanticsFlags enum
on the C++ side.

This also clarifies/corrects the documentation for this value in dart:ui
and in the embedder API.
2019-03-04 22:00:54 -08:00
Matt Carroll
8f1fdcd195
Android Embedding PR 14: Almost done with FlutterFragment. (#8000) 2019-03-04 18:02:24 -08:00
Matt Carroll
fb3e35d6ac
Android Embedding PR15: Add Viewport Metrics to FlutterView (#8029) 2019-03-04 17:12:52 -08:00
Chris Yang
36ca5740c7
[platform_views] Fix duplicated touch event pass down to flutter view from platform view. (#8026)
Fix for flutter/flutter#27700 and flutter/flutter#24207

There are 2 fixes included in this PR.

The intercepting views sometime pass up the touches events to flutter view, even after the forward gesture recognizer pass the event to the flutter view. We only want the event to be passed to the flutter view once. So we let the intercepting view 'consumes' the event in this PR to fix the problem.

When a touch sequence has multiple touch points participated(e.g. Pinch gesture), the touchesBegan and touchesEnded can be triggered multiple times if the touches do not happen simultaneously. One example would be: when performing a pinch gesture with 2 fingers, I put down one finger, keep the finger on the screen, then put down another finger, perform pinch, lift up both finger at the same time. In this sequence, touchesBegan is called twice with each touch in one of the calls and touchesEnded is called once and has 2 touches in the callback. To handle this issue, we added a count to count the touches in one touch sequence. We only set the state to fail when the count reaches 0(That is all the touches has began in the current sequence is ended).
2019-03-04 15:55:32 -08:00
Dan Field
a2246c1990
Start of linting Android embedding (#8023)
* Add a tool for running Android SDK lint on Android embedding
2019-03-04 13:55:53 -08:00
Dan Field
13064aec87
Add overloads for lookup that lets you specify a bundle (#8007)
* Add overloads for lookup that lets you specify a bundle

* check bundle with defaultBundleIdentifier before main bundle
2019-03-02 10:01:51 -08:00
Gary Qian
39c46dea4b
Revert "Buffer lifecycle in WindowData (#7999)" (#8010)
This reverts commit 0b174017143c34629546134601bb6c65becf71a3.
2019-03-01 15:14:20 -08:00
Greg Spencer
293cfcaa54
Guard against using Android API not defined in API level 16 & 17 (#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
Gary Qian
0b17401714
Buffer lifecycle in WindowData (#7999) 2019-03-01 10:43:09 -08:00
Chris Bracken
99f3f7a9c2
Fix incorrect transformation matrix (#8001)
Previously the transformation matrix returned on semantics nodes was
fetched by matrix col,row (incorrectly). This uses the SkMatrix
constants instead and adds a test.
2019-02-28 19:19:06 -08:00
Matt Carroll
fe15149d1a
Android Embedding PR 12: Add lifecycle methods to FlutterActivity. (#7974) 2019-02-28 16:51:17 -08:00
Matt Carroll
6145e9046a
Android Embedding PR 13: Integrated text input, keyevent input, and some other channel comms in FlutterView. (#7979) 2019-02-28 15:02:56 -08:00
Matt Carroll
56c16154ea
Android Embedding PR 9: Introduce an AndroidTouchProcessor to convert MotionEvents to Flutter touch data. (#7947) 2019-02-28 14:44:28 -08:00
Chris Bracken
72cbe69cc8
Fix two typos in embedder.h (#7993)
occured -> occurred
preceeded -> preceded
2019-02-27 21:10:08 -08:00
Matt Carroll
2360b459de
Android Embedding PR 11: Add FlutterEngine to FlutterFragment. (#7972) 2019-02-27 21:09:28 -08:00
Chris Bracken
3e4e6f5c54
Provide batching for semantics updates (#7988)
Some embedders prefer to minimise the number of semantics node/custom
action updates sent back to the host platform -- for example due to
expensive serialisation mechanisms, etc.

This patch provides a 'batch end' signal that provides embedders with an
indication of when a self-consistent set of semantics node or custom action
updates have been sent.

We overload the node/action ID with information that conveys a batch end
by using an ID (-1) that is never allotted to semantics nodes by the
framework.
2019-02-27 12:12:45 -08:00
Jason Simmons
1089b5c9f8
Check for a null pressure range for motion events (#7986)
Fixes https://github.com/flutter/flutter/issues/28490
2019-02-27 11:27:19 -08:00
stuartmorgan
b7d5129492
[macos] Add hover support to FLEViewController (#7975)
Adds an option to enable mouse tracking, which will send
add/hover/remove events to the Flutter engine.
2019-02-27 10:06:57 -08:00
Matt Carroll
4db7c30501
Android Embedding PR 10: Add system channels to FlutterEngine. (#7960) 2019-02-26 19:05:18 -08:00
Jason Simmons
9f92324fd6
Suppress deprecation warning for usage of Configuration.locale (#7973) 2019-02-26 17:03:10 -08:00
Ben Konyi
fb1c543dd4
Link dart:* sources into engine for debugger source support (#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
4434a39c7d
Add api 21 check to LocalizationChannel.java (#7967) 2019-02-26 11:33:07 -08:00
Matt Carroll
9f95ef23aa
Android Embedding PR 8: Add FlutterEngine attachment/detachment to FlutterView (#7946) 2019-02-26 01:54:17 -08:00
Matt Carroll
31d31e6d2a
Android PR 7: Introduce structure of FlutterActivity and FlutterFragment (#7912) 2019-02-26 01:48:09 -08:00
Matt Carroll
18ad03d49d
Fixed an Android keyboard entry bug that was introduced by the embedding refactor. (#28438) (#7954) 2019-02-25 19:15:49 -08:00
Jason Simmons
fd6c3fc700
Do not clear FlutterJNI state when a FlutterView is detached (#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
Chris Bracken
f2489c1b5d
Correct FlutterSemanticsNode member name style (#7942)
Correct struct members whose names were camelCase rather than
snake_case. This is a breaking API change, but does not break ABI.
2019-02-24 22:33:55 -08:00
Ivan
f7306394e3 fix sendLocales on old android versions (#7937)
[Configuration.getLocales()][1] was added in API level 24. 
For earlier versions, we instead return only the current locale.

Fixes https://github.com/flutter/flutter/issues/28321

[1]: https://developer.android.com/reference/android/content/res/Configuration#getLocales()
2019-02-24 22:29:16 -08:00
Matt Carroll
502c9c4002
Android Embedding PR 6: Introduce FlutterView structure with FlutterSurfaceView and FlutterTextureView. (#7896) 2019-02-24 20:41:18 -08:00
Mehmet Fidanboylu
204e7da36c
New setting to decide whether we want the engine to load ICU mapping. (#7928) 2019-02-22 14:49:15 -08:00