1103 Commits

Author SHA1 Message Date
zljj0818
0ef14f3ca3 More rename from GPU thread to raster thread (flutter/engine#22819) 2020-12-03 15:03:02 -08:00
Greg Spencer
7e51be2917 Reland: "Fix race condition in key event handling on Android (#22658)" (flutter/engine#22834) 2020-12-03 08:53:02 -08:00
Gary Qian
9352ed557e Split AOT Engine Runtime (flutter/engine#22624) 2020-12-02 13:28:01 -08:00
Jason Simmons
111a924c83 Generate Maven metadata files for engine artifacts (flutter/engine#22685) 2020-12-02 12:43:01 -08:00
Greg Spencer
5e89debe49 Revert "Fix race condition in key event handling on Android (#22658)" (flutter/engine#22823)
This reverts commit dee9413 (#22658) because it breaks some Google tests. Will investigate and re-land.
2020-12-02 12:03:48 -08:00
Greg Spencer
dee94135d4 Fix race condition in key event handling on Android (flutter/engine#22658)
This fixes a problem in Android key event handling where, because I was only using a single bool to indicate that we were re-dispatching, there was a race condition when multiple keys were pending (sent to the framework, awaiting responses).

This fixes that by switching to a mechanism that uses the event itself to tell if it was redispatched.

In doing this, I realized that because key events can come from either the dispatchEvent call, or through the InputConnectionAdaptor, I needed to handle both routes properly so that the events would all be handled, and all go through the same mechanism on the framework side.
2020-12-01 09:42:38 -08:00
Gary Qian
05927cf60d Add FlutterPlayStoreSplitApplication for simpler opt in to Split AOT (flutter/engine#22752) 2020-11-30 19:27:44 -08:00
xster
fd77ecc84c Let FlutterFragment not pop the whole activity by default when more fragments are in the activity (flutter/engine#22692) 2020-11-30 12:43:03 -08:00
Jason Simmons
567590484f Fix the unchecked conversion warning for searchPaths in PlayStoreDynamicFeatureManager (flutter/engine#22654)
Also use the diamond operator throughout this class.
2020-11-30 12:23:09 -08:00
Jason Simmons
ec51a006fe Make AndroidContext::IsValid virtual (flutter/engine#22665)
Fixes https://github.com/flutter/flutter/issues/70938
2020-11-21 07:51:39 -08:00
Gary Qian
b29a73b5dc Fix java warnings for unchecked conversions in PlayStoreDynamicFeatureManager (flutter/engine#22628) 2020-11-20 13:37:26 -08:00
Greg Spencer
5c883e2293 Fix double delete on backspace on Android (flutter/engine#22626) 2020-11-20 10:43:02 -08:00
Gary Qian
3676366194 Split AOT Android Embedder and shell (flutter/engine#22179) 2020-11-19 17:22:26 -08:00
Ari Weiland
bd40f31603 Update the tag for FlutterEngineConnectionRegistry to be 23 characters. (flutter/engine#22610) 2020-11-19 12:06:56 -08:00
Emmanuel Garcia
dba50d32e6 Replace support libraries for AndroidX (flutter/engine#22598) 2020-11-19 10:08:02 -08:00
Gary Qian
7a18791454 Rename padding->viewPadding to match framework naming conventions (flutter/engine#22599) 2020-11-19 09:50:51 -08:00
gaaclarke
0901a93e5b started providing the GPU sync switch to external view embedders (flutter/engine#22302) 2020-11-17 18:43:01 -08:00
Jason Simmons
9af515627c Make the AndroidContext superclass destructor virtual (flutter/engine#22555)
Also remove an obsolete external_view_embedder reference from
AndroidSurfaceFactoryImpl.

Fixes https://github.com/flutter/flutter/issues/70621
2020-11-16 17:46:52 -06:00
Hamdi Kahloun
1be95d91c7 [Android] Add systemNavigationBarDividerColor (flutter/engine#22538) 2020-11-16 10:48:02 -08:00
Hamdi Kahloun
105724c50c Revert "Update PlatformPluginTest.java & PlatformPlugin.java"
This reverts commit bca3c2e7d2e248ca4a6f764fb81d4de9516cf640.
2020-11-16 16:53:30 +01:00
Hamdi Kahloun
bca3c2e7d2 Update PlatformPluginTest.java & PlatformPlugin.java 2020-11-16 16:28:03 +01:00
Ari Weiland
435a0f38be Fix some serious lifecycle bugs with Android embedding code (flutter/engine#22203) 2020-11-13 11:58:02 -08:00
Kaushik Iska
0b4d2a8c36 [android] Platform view creates external view embedder (flutter/engine#22360) 2020-11-13 05:52:41 -08:00
Kaushik Iska
356e31aef5 Reland "remove surface dependance on external view embedder (#22468)" (flutter/engine#22470) 2020-11-12 15:37:12 -08:00
Dan Field
b388181b25 Limit heap growth on Android (flutter/engine#20473)
Limit heap growth to half of totalMem by default, with the option to set it higher or lower in the AndroidManifest
2020-11-12 14:53:54 -08:00
LongCatIsLooong
07032ba889 [Android text input] Reland #21534 (flutter/engine#22435) 2020-11-12 11:34:01 -08:00
Emmanuel Garcia
1d0a96bd3f Fix talkback in hybrid composition while using FlutterFragmentActivity (flutter/engine#22429) 2020-11-12 10:30:29 -08:00
Kaushik Iska
ae4dbc51b8 Reverts 2 commits that remove surface dependance on external view embedder (flutter/engine#22468)
* Revert "Remove GetExternalViewEmbedder from surface (#22272)"

This reverts commit 9dffddd08d0ad6fa7434c5a5bdff87e09da92e57.

* Revert "Rasterizer is initialized with an external view embedder (#22405)"

This reverts commit 417c869d6bcd70ba82fdd6efc8db1efa19fb997c.
2020-11-12 08:41:11 -08:00
LongCatIsLooong
fbfb27f515 Revert "[Android Text Input] Make the editing state listenable and allow batch edits (#21534)" (flutter/engine#22434) 2020-11-11 18:24:02 -08:00
chunhtai
65456583c8 reland support uri launch in android (flutter/engine#22363)
* Revert "Revert "support uri intent launcher in android (#21275)" (#22298)"

This reverts commit 9a5b6b4e910bcfac97a330a4aa2cbe2f14b57522.

* reland support uri launch for android

* refactor

* update

* fix test

* addressing comments

* addressing comments

* revert throw error
2020-11-11 14:51:04 -08:00
Kaushik Iska
9dffddd08d Remove GetExternalViewEmbedder from surface (flutter/engine#22272)
This decouples surfaces from view embedders.
2020-11-11 13:45:24 -08:00
LongCatIsLooong
7d20e41baf [Android Text Input] Make the editing state listenable and allow batch edits (flutter/engine#21534) 2020-11-10 19:19:03 -08:00
Kaushik Iska
8b9acb11b8 Move common graphics utils to //flutter/common/graphics (flutter/engine#22320) 2020-11-10 12:34:02 -08:00
xster
8d9b9217d7 move deprecation from the PluginRegistry outer interface to inner, v1-specific fields (flutter/engine#22345) 2020-11-09 13:57:06 -08:00
Greg Spencer
b25769b79b Use dispatchKeyEvent, and handle keys sent to InputConnection.sendKeyEvent on Android (flutter/engine#22340)
This (mostly) re-lands #21163, which was reverted in #22321

This switches from using onKeyDown to using dispatchKeyEvent on Android so that keys can be intercepted handled by the framework and not continue to be dispatched to other controls.

It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends them to Flutter.

This fixes the problem where (for example) pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.

Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent, and system keys (like the back button) are only received if the IME doesn't eat them.
2020-11-06 12:45:47 -08:00
Kaushik Iska
ea42f7eaa0 Platform views have CreateExternalViewEmbedder (flutter/engine#22214) 2020-11-06 05:30:48 -08:00
Greg Spencer
440ff6e3f4 Revert "Reland: Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#22304)" (flutter/engine#22321)
This reverts commit b289c1711fd8357fe5a6c8aa66683d0d2ca55e48 because it breaks back button functionality.
2020-11-05 09:02:25 -08:00
Greg Spencer
b289c1711f Reland: Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (flutter/engine#22304)
This re-lands #21163, which was reverted in #22004

Now that flutter/flutter#67359 has landed, this change will no longer cause spaces (and other shortcuts) to be ignored in text fields if there is no action associated with the intent, even if there is a shortcut key mapping to an intent.

It also no longer causes web test failures (as far as I can tell without submitting it: the same tests don't fail locally).

Here's the original PR description:

This switches from using dispatchKeyEvent to using dispatchKeyEventPreIme so that keys can be intercepted before they reach the IME and be handled by the framework.

It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends the to Flutter before sending them to the IME (which it now only does if they are not handled by the framework).

This fixes the problem where pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.

Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent.
2020-11-04 15:54:21 -08:00
chunhtai
9a5b6b4e91 Revert "support uri intent launcher in android (#21275)" (flutter/engine#22298) 2020-11-04 15:04:02 -08:00
chunhtai
272e2b2bac makes android semanticsnode to ignore hittest if it is not focusable (flutter/engine#22205) 2020-11-02 09:53:01 -08:00
Lazy Llama
176d1345a4 Fix viewInset.bottom and viewPadding.bottom… (flutter/engine#21730) 2020-10-29 17:28:01 -07:00
Jason Simmons
b76d246acb Reformat some files that were not auto-formatted (flutter/engine#21940) 2020-10-23 18:57:03 -07:00
chunhtai
f826d9992e support uri intent launcher in android (flutter/engine#21275)
* support uri intent launcher in android

* fix comment
2020-10-22 15:54:30 -07:00
Lau Ching Jun
743edee507 Support loading assets from Android dynamic feature modules (flutter/engine#21504)
Initialize the AssetManager from the application context so that assets from dynamic feature modules can be loaded.
2020-10-22 15:53:11 -07:00
Greg Spencer
06b6f8af89 Reland: Migration to PlatformDispatcher and multi-window (flutter/engine#21932)
This re-lands #20496 and #21780 after fixing the semantics-enabling code that was causing the post-submit web_smoke_test to fail.

Below is the description from the original PR:

This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-22 14:54:25 -07:00
chunhtai
0f2c3c9bf4 Fixes Edge trigger route change announcement (flutter/engine#21975) 2020-10-22 14:22:03 -07:00
Greg Spencer
22f99901e4 Revert "Reland: Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#21979)" (flutter/engine#22004)
This reverts commit 410db6115268fe6d7561adf68d0fb04adf314c43 because it causes some failures in web tests.
2020-10-20 11:42:01 -07:00
Greg Spencer
410db61152 Reland: Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (flutter/engine#21979)
This re-lands #21163, which was reverted in #21513

Now that flutter/flutter#67359 has landed, this change will no longer cause spaces (and other shortcuts) to be ignored in text fields if there is no action associated with the intent, even if there is a shortcut key mapping to an intent.

Here's the original PR description:

This switches from using dispatchKeyEvent to using dispatchKeyEventPreIme so that keys can be intercepted before they reach the IME and be handled by the framework.

It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends the to Flutter before sending them to the IME (which it now only does if they are not handled by the framework).

This fixes the problem where pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.

Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent.
2020-10-20 10:14:31 -07:00
Jason Simmons
9af9295516 Fix the initialization of AndroidSurfaceFactoryImpl (flutter/engine#21977)
Fixes https://github.com/flutter/flutter/issues/68446
2020-10-19 16:22:36 -07:00
Jason Simmons
7f47aac6f2 Break the reference cycle between the surface factory and the external view embedder (flutter/engine#21918)
See https://github.com/flutter/flutter/issues/68315
2020-10-16 15:03:26 -07:00