364 Commits

Author SHA1 Message Date
Jonah Williams
9f7eec7f7a Ensure assistiveTechnologyEnabled is initialized when the android view is set up (flutter/engine#5793) 2018-07-18 15:32:38 -07:00
amirh
c649bff5af Add touch events to the platform views method channel API. (flutter/engine#5796) 2018-07-18 15:20:59 -07:00
Jonah Williams
35f0247c87 Fix allocation of JNI byte buffer on API level 22 and below (flutter/engine#5788) 2018-07-17 11:58:42 -07:00
Jason Simmons
b76d939032 Handle Android vsync callbacks that occur after the VsyncWaiter has been deleted (flutter/engine#5749)
Fixes https://github.com/flutter/flutter/issues/19159
2018-07-16 12:04:05 -07:00
Jonah Williams
c8516387e2 Revert rollback of "add assistiveTechnologyEnabled to window" (flutter/engine#5750) 2018-07-16 09:04:20 -07:00
Jonah Williams
b07e9faa35 Revert "Add assistiveTechnologyEnabled flag to window" (flutter/engine#5746)
Reverts flutter/engine#5740
2018-07-13 15:55:49 -07:00
amirh
3628fa0f6b Implement PlatformViewsController. (flutter/engine#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
71e01bf548 Add assistiveTechnologyEnabled flag to window (flutter/engine#5740) 2018-07-13 13:47:31 -07:00
amirh
31747d600c gitignore intellij generated folder (flutter/engine#5729) 2018-07-13 09:23:43 -07:00
Jonah Williams
9007b92cdd rollback chrome change (flutter/engine#5721) 2018-07-11 15:28:33 -07:00
amirh
e0203cb408 Platform Views: Android and MethodChannel APIs, and implementation skeleton. (flutter/engine#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
5bf14b1e4d Custom accessibility (local context) action support for iOS and Android. (flutter/engine#5597) 2018-07-11 10:27:50 -07:00
Jonah Williams
5898c7d068 Swap definitions of SystemChrome apis to match iOS (requires framework change when rolling) (flutter/engine#5609) 2018-07-10 17:36:31 -07:00
amirh
eada888921 Remove unused Java imports (flutter/engine#5663) 2018-07-03 09:21:03 -07:00
matthew-carroll
7edb7e3bc7 Support all keyboard actions. (#11344) (flutter/engine#5620)
* Support all keyboard actions. (#11344)
2018-07-02 06:58:01 +00:00
Jonah Williams
0d6edb079d ensure a11y state is communicated back to flutter (flutter/engine#5631) 2018-06-28 13:30:51 -07:00
Jason Simmons
2d1668246d Remove some unused code from the Android host (flutter/engine#5619)
These functions were made obsolete by the engine refactoring
(077d29581c)
2018-06-27 11:06:15 -07:00
Jason Simmons
1348956a03 Check for calls to FlutterMain.ensureInitializationComplete before startInitialization (flutter/engine#5614) 2018-06-25 16:32:38 -07:00
Jason Simmons
0b419727e7 Load the ICU data file asset from the "flutter_shared" path (flutter/engine#5567)
See https://github.com/flutter/flutter/issues/18514
2018-06-19 14:34:13 -07:00
Ryan Macnak
e8df7055bc Replace AssetResolver GetAsBuffer with GetAsMapping. (flutter/engine#5546)
Toward no-copy loading of kernel.
2018-06-19 14:24:19 -07:00
Chinmay Garde
93a6d340fa Add explicit casts to pointer data members on Android. (flutter/engine#5558)
This accounts for changes made in https://github.com/flutter/engine/pull/5556
2018-06-18 12:08:11 -07:00
Ian Hickson
19d7432403 Remove spurious log messages (flutter/engine#5547)
These are making some of the tests that are sensitive to output flakey.
2018-06-15 14:15:35 -07:00
Stanislav Baranov
6d140f4e43 Fix compile error introduce in #5473. (flutter/engine#5488)
Fix compile error introduced in #5473.
2018-06-07 15:36:35 -07:00
Stanislav Baranov
5afc3daf35 Support running bundles from zip file. (flutter/engine#5473)
Support running bundles from zip file.
2018-06-07 15:09:23 -07:00
Zachary Anderson
e95110f16f Adds dynamic, interpreter configs to tools/gn (flutter/engine#5446)
Adds --dynamic and --interpreter flags to
tools/gn. These flags result in engines with
properties as follows:

--dynamic:
- JIT targeting native code on Android and
  DBC on iOS

--interpreter
- Target DBC even if running on Android.

For example:

gn --android --dynamic --interpreter --runtime-mode release

Will generate an engine:
- Without Dart asserts
- Without Observatory
- With JIT compililation to DBC

into out/android_dynamic_release_dbc
2018-06-05 14:52:52 -07:00
Stanislav Baranov
5c89db5409 Remove unused argument. (flutter/engine#5471) 2018-06-05 13:11:18 -07:00
Chinmay Garde
23fd79d790 Parse --verbose-logging flag from intent and pass to the engine as args. (flutter/engine#5447) 2018-06-01 17:34:45 -07:00
Mehmet Fidanboylu
4d4a42b63c Fix lint errors to prepare for building Android files in Google (flutter/engine#5440) 2018-06-01 10:16:50 -07:00
Chinmay Garde
aa608f192b Create a shell with no GPU configurations unless explicitly specified by the platform. (flutter/engine#5383) 2018-05-25 14:31:01 -07:00
Simon Lightfoot
1987911c7d Add support for physical keyboards on Android (flutter/engine#5324)
* Fixes flutter/flutter#7943
* Fixes flutter/flutter#9347
* Fixes flutter/flutter#11177
2018-05-24 15:21:33 -07:00
Ryan Macnak
8e2bc7b70e Reapply "Don't link the core snapshot in the Android engine." (flutter/engine#5353)
Add back the core snapshot to runtime_unittests and embedder_unittests.
2018-05-23 17:09:51 -07:00
Ryan Macnak
49c1ba1007 Revert "Don't link the core snapshot in the Android engine. (#5348)" (flutter/engine#5352)
This reverts commit d40b0dbcd2c28fbd4eadc91943f3c2c9ee0d7df5.
2018-05-23 16:11:57 -07:00
Michael Goderbauer
3337784f29 Remove assert for unsupported SemanticsEvents (flutter/engine#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
d40b0dbcd2 Don't link the core snapshot in the Android engine. (flutter/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
7df1242691 split children into two ordered lists: traversal and hit test (flutter/engine#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
52e89069cb Re-add ACTION_LONG_CLICK for Android a11y (flutter/engine#5330) 2018-05-21 11:29:50 -07:00
Chinmay Garde
1718f9b935 Break the FXL from flutter/assets. (flutter/engine#5316) 2018-05-18 17:04:36 -07:00
Michael Goderbauer
cfbbc59034 Only send a11y events if a11y is turned on (flutter/engine#5281) 2018-05-16 13:12:56 -07:00
Jason Simmons
4f15413841 Support a model where the application creates a FlutterNativeView that is never destroyed (flutter/engine#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
Jason Simmons
6431f174d4 Detach from JNI before exiting the GPU thread. (flutter/engine#5231)
The GPU thread calls into Java via JNI in order to update external textures.

Fixes https://github.com/flutter/flutter/issues/17329
2018-05-11 11:42:19 -07:00
Jonah Williams
e36f92ec65 Re-land Enables system chrome customization on Android O/N and greater (flutter/engine#5171) 2018-05-07 15:45:59 -07:00
Jonah Williams
92e3517650 add onStart hook which places flutter in an inactive state (flutter/engine#5177) 2018-05-04 14:46:57 -07:00
Jonah Williams
c2349b2245 Revert "Enables system chrome customization on Android O and greater" (flutter/engine#5167)
* Revert "Roll dart sdk to e6d7d67f4b35556805dd083fed15bf3ed41f7e33. (#5165)"

This reverts commit 75b94b4ea5307c723c6003b9d7a786ac3f22bce1.

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

This reverts commit f4136be0d552a5b7f1f8bfafc3c5da4a70dda190.
2018-05-03 15:38:25 -07:00
Jonah Williams
f4136be0d5 Enables system chrome customization on Android M/O and greater (flutter/engine#5112) 2018-05-03 13:10:44 -07:00
Jonah Williams
8bac5d84be Add Android accessibility bridge support for "longPress" and "tap" semantic events 2018-05-02 17:24:29 -07:00
xster
fa659500dd Increase the GPU thread priority and add error logging (flutter/engine#5117) 2018-04-30 17:18:33 -07:00
Jason Simmons
d47e663efa Re-land "Hold a global reference to the AssetManager Java object backing the APKAssetProvider" (flutter/engine#5132)
Fixes https://github.com/flutter/flutter/issues/16222
2018-04-30 12:29:40 -07:00
Jason Simmons
8c9ef95bea Detach from JNI during shutdown of the UI thread on Android (flutter/engine#5120)
The APKAssetProvider will hold a reference to its Java peer
(see c2b081e229)

After dropping this reference, the UI thread must detach from JNI before exiting.
2018-04-30 10:44:01 -07:00
Yegor
2b58565cee Revert "Hold a global reference to the AssetManager Java object backing the APKAssetProvider (#5078)" (flutter/engine#5116)
This reverts commit c2b081e229eb3c1103d0d06f0c9d7057166ece1d.

It causes engine crashes in some Android Espresso tests.
2018-04-27 13:47:26 -07:00
Jonah Williams
08d8e86ff1 Add tooltip method to Android AccessibilityBridge (flutter/engine#5103) 2018-04-26 15:03:47 -07:00