269 Commits

Author SHA1 Message Date
Jonah Williams
a5215ce500
Add hasImplicitScrolling SemanticFlag and support in Android bridge (#5941) 2018-08-06 13:57:00 -07:00
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
Jonah Williams
dcd2956f88
Initial support for more finely-grained a11y features on Window (#5901) 2018-07-31 18:18:19 -07:00
Jonah Williams
236d633a49
Add word movement granularities to android (#5902) 2018-07-30 17:53:17 -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
Jonah Williams
d559afb320
Support customizing standard accessibility actions on Android. (#5823) 2018-07-25 15:26:02 -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
Jonah Williams
96f5f5b96c
Semantics framework updates (#5601) 2018-07-20 11:17:59 -07:00
Jonah Williams
d1c71e5206
add text capitalization support to ios and android (#5752) 2018-07-19 18:07:18 -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
2e57ecd38f
Revert rollback of "add assistiveTechnologyEnabled to window" (#5750) 2018-07-16 09:04:20 -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
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
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
Jason Simmons
fbb3436eaa
Remove some unused code from the Android host (#5619)
These functions were made obsolete by the engine refactoring
(6baff4c821)
2018-06-27 11:06:15 -07:00
Jason Simmons
2c158b6390
Check for calls to FlutterMain.ensureInitializationComplete before startInitialization (#5614) 2018-06-25 16:32:38 -07:00
Jason Simmons
1174a4d9fe
Load the ICU data file asset from the "flutter_shared" path (#5567)
See https://github.com/flutter/flutter/issues/18514
2018-06-19 14:34:13 -07:00
Ian Hickson
824e45e7c1
Remove spurious log messages (#5547)
These are making some of the tests that are sensitive to output flakey.
2018-06-15 14:15:35 -07:00
Stanislav Baranov
cce4fd2279
Remove unused argument. (#5471) 2018-06-05 13:11:18 -07:00
Chinmay Garde
16f4da984c
Parse --verbose-logging flag from intent and pass to the engine as args. (#5447) 2018-06-01 17:34:45 -07:00
Mehmet Fidanboylu
d7e3f2d6e7
Fix lint errors to prepare for building Android files in Google (#5440) 2018-06-01 10:16:50 -07:00
Simon Lightfoot
abd74ed5ed Add support for physical keyboards on Android (#5324)
* Fixes flutter/flutter#7943
* Fixes flutter/flutter#9347
* Fixes flutter/flutter#11177
2018-05-24 15:21:33 -07:00
Ryan Macnak
86d96fd0ce
Reapply "Don't link the core snapshot in the Android engine." (#5353)
Add back the core snapshot to runtime_unittests and embedder_unittests.
2018-05-23 17:09:51 -07:00
Ryan Macnak
2e9ff1f09a
Revert "Don't link the core snapshot in the Android engine. (#5348)" (#5352)
This reverts commit e0d4c4641386b8a81c7e9c3bc1a32172d81a785d.
2018-05-23 16:11:57 -07:00
Michael Goderbauer
47f4a2aad4
Remove assert for unsupported SemanticsEvents (#5349)
Not all platforms are expected to handle all SemanticsEvents. Therefore, it is ok to just drop unsupported events on the floor.
2018-05-23 16:05:15 -07:00
Ryan Macnak
e0d4c46413
Don't link the core snapshot in the Android engine. (#5348)
Allows one to use a different core snapshot without a custom engine build by just packaging a different one in the APK.
2018-05-23 15:56:28 -07:00
Yegor
f876bd5710
split children into two ordered lists: traversal and hit test (#5091)
* split `children` into two ordered lists: traversal and hit test

* address comments

* reduce node object byte size

* link to DebugSemanticsDumpOrder
2018-05-21 17:44:23 -07:00
Michael Goderbauer
eb4d823557
Re-add ACTION_LONG_CLICK for Android a11y (#5330) 2018-05-21 11:29:50 -07:00
Michael Goderbauer
a7b44d4ab0
Only send a11y events if a11y is turned on (#5281) 2018-05-16 13:12:56 -07:00
Jason Simmons
c7ab033f9e
Support a model where the application creates a FlutterNativeView that is never destroyed (#5256)
This allows applications to start a Flutter engine instance during app startup
and keep it running throughout the app process' lifetime.

FlutterActivity subclasses can override createFlutterNativeView to provide a
preinitialized FlutterNativeView instance and override retainFlutterNativeView
to signal that the FlutterNativeView should be kept alive when the activity
is destroyed.
2018-05-15 12:05:54 -07:00
Jonah Williams
57f53b98a4
Re-land Enables system chrome customization on Android O/N and greater (#5171) 2018-05-07 15:45:59 -07:00
Jonah Williams
e1cd506187
add onStart hook which places flutter in an inactive state (#5177) 2018-05-04 14:46:57 -07:00
Jonah Williams
3c583f81d9
Revert "Enables system chrome customization on Android O and greater" (#5167)
* Revert "Roll dart sdk to e6d7d67f4b35556805dd083fed15bf3ed41f7e33. (#5165)"

This reverts commit 9e4c5d0e1f9daf0c46fdc7e5d1e81ce9c36b65c4.

* Revert "Enables system chrome customization on Android M/O and greater (#5112)"

This reverts commit f2db5dfd30f12407acab57f04acc8af7c6158891.
2018-05-03 15:38:25 -07:00
Jonah Williams
f2db5dfd30
Enables system chrome customization on Android M/O and greater (#5112) 2018-05-03 13:10:44 -07:00
Jonah Williams
93b85ee68a
Add Android accessibility bridge support for "longPress" and "tap" semantic events 2018-05-02 17:24:29 -07:00
Jonah Williams
e11905c6e5
Add tooltip method to Android AccessibilityBridge (#5103) 2018-04-26 15:03:47 -07:00
Yegor
ec611470b5
replace nextNodeId/previousNodeId with hitTestPosition (#5066) 2018-04-23 16:16:17 -07:00
Jason Simmons
232060828a Fix syntax error in AccessibilityBridge (#5059) 2018-04-20 13:54:27 -07:00