1034 Commits

Author SHA1 Message Date
Emmanuel Garcia
dbca16555e Support dragging native platform views (flutter/engine#21396) 2020-09-25 17:46:34 -07:00
Kaushik Iska
5f34b84423 Embedder API Support for display settings (flutter/engine#21355)
Embedders can now notify shell during startup about the various displays and their corresponding settings.
Adds a notion of Display update type which can later include chages to displays during runtime such as addition / removal / reconfiguration of displays.

We also remove the responsibility of providing the refresh rate from `vsync_waiter` to `DisplayManager`.
Rewires existing platform implementations of the said API to use `Shell::OnDisplayUpdate` to notify the display manager of the startup configuration.

DisplayManager is also thread-safe to account for rasterizer and UI thread accesses.
2020-09-25 11:04:10 -07:00
Gary Qian
e714ae10db Locale -> LanguageRange conversion to be more general in Android platformResolvedLocale (flutter/engine#21350) 2020-09-23 21:52:02 -07:00
Jason Simmons
32fbdb6755 Fix boolean value checks in StandardMessageCodec (flutter/engine#21270)
Fixes https://github.com/flutter/flutter/issues/65619
2020-09-23 16:31:07 -07:00
xster
1644e2fbcf Re-land deprecate Android v1 embedding classes (flutter/engine#21347) 2020-09-23 11:25:20 -07:00
Jason Simmons
1158faf54c Retain the WindowInsetsAnimation callback if code shrinking is enabled (flutter/engine#21330) 2020-09-23 09:17:02 -07:00
Zachary Anderson
01982beebc Revert "Deprecate Android v1 embedding classes (#20868)" (flutter/engine#21338)
This reverts commit 7b1562112962b1b22926938fad6438279ed6467c.
2020-09-22 14:38:18 -07:00
xster
aa3ac9e9aa Enforce exclusivity for activity and fragments attached to the FlutterEngine (flutter/engine#21272) 2020-09-22 10:34:52 -07:00
Jason Simmons
bc82ee9267 Disconnect the view's AndroidKeyProcessor when detaching from the engine (flutter/engine#21307) 2020-09-21 17:42:02 -07:00
xster
7b15621129 Deprecate Android v1 embedding classes (flutter/engine#20868) 2020-09-21 15:02:02 -07:00
Gary Qian
b2a78b0db5 Remove extraneous window inset call on IME animation (flutter/engine#21213) 2020-09-16 14:04:50 -07:00
Hamdi Kahloun
489c648b42 Fix NPE in PlatformPlugin.getClipboardData() (flutter/engine#21189) 2020-09-15 17:00:57 -07:00
Emmanuel Garcia
3a7b283bb3 Account for current open image in FlutterImageView (flutter/engine#21191) 2020-09-15 14:10:55 -07:00
kaisa695275735
85f1cd7356 delete opengl texture when it detatch from surfacetexture. (flutter/engine#18733) 2020-09-14 14:07:39 -07:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Emmanuel Garcia
1ec891cb52 Fix comment indentation (flutter/engine#21114) 2020-09-11 17:50:26 -07:00
Emmanuel Garcia
8a317ebabc Add a new raster status kSkipAndRetry frame (flutter/engine#21059) 2020-09-11 16:29:11 -07:00
Chris Bracken
9ff7d7ca44 Copyright header hygiene improvements (flutter/engine#21089)
Add copyright headers in a few files where they were missing.

Trim trailing blank comment line where present, for consistency with
other engine code.

Use the standard libtxt copyright header in one file where it differed
(extra (C) and comma compared to other files in libtxt).

This also amends tools/const_finder/test/const_finder_test.dart to look
for a const an additional four lines down to account for the copyright
header added to the test fixture.
2020-09-11 08:55:37 -07:00
kele86838437
260a850e93 Update Androidx import (flutter/engine#19059) 2020-09-09 16:10:03 -07:00
linxuebin
538ae021ea Increase thread priority before engine init (flutter/engine#20922)
We get huge ANRs in not pure flutter app.
We found that 0.15% of the engine initialization took more than 10 seconds, every 10 million starts.
2020-09-09 14:07:34 -07:00
Gary Qian
cd4ac5d0a3 [Android R] Sync keyboard animation with view insets vs Android 11/R/API 30 WindowInsetsAnimation (flutter/engine#20843) 2020-09-04 02:06:30 -07:00
xster
ed15a009fe Let FlutterActivity/Fragment/FragmentActivity have an app bundle path override instead of eager resolving during construction (flutter/engine#20769) 2020-09-03 17:31:30 -07:00
Guokai-Cheng
03d8863078 Ensure the destructor is called since it destroys the EGLSurface before creating a new onscreen surface. (flutter/engine#20916) 2020-09-03 14:32:48 -07:00
Gary Qian
a1755b3feb [Android R] Integrate DisplayCutouts into viewportMetrics (flutter/engine#20921) 2020-09-02 05:18:35 -07:00
Emmanuel Garcia
12b8249404 Ensure all images are closed in FlutterImageView (flutter/engine#20842) 2020-09-01 16:57:45 -07:00
Jason Simmons
4bd9085a47 Pass text input key events to the EventResponder if they do not yield characters (flutter/engine#20912)
If the InputConnectionAdaptor receives a key event that does not move
the caret or produce a text character (such as the back button), then
the event should be given to the EventResponder which will forward it
to the view.

Fixes https://github.com/flutter/flutter/issues/64864
2020-08-31 17:56:09 -07:00
xster
7b62a6c11a Add auto plugin registration to FlutterFragmentActivity as well (flutter/engine#20865) 2020-08-31 13:43:46 -07:00
Emmanuel Garcia
2f8279900b Reland: Enable hybrid composition by default on Android (#20722) (flutter/engine#20864)
This reverts commit bb885a23e20d79c163dc884530acaafd6c311f2a.
2020-08-31 12:17:11 -07:00
xster
c09700b409 Add a java injector for testing (flutter/engine#20789) 2020-08-29 22:29:23 -07:00
Emmanuel Garcia
9d05be2966 Add ability to disable the raster thread merger (flutter/engine#20800) 2020-08-28 17:25:00 -07:00
Greg Spencer
408d2228fa Reland: Implement delayed event synthesis key event handling for Android (flutter/engine#20736)
This re-lands the key event synthesis implementation for Android (Original PR: #19024, Revert PR: #19956). The only difference is sending the synthesized key events to the root view instead of the current view.

Without sending it to the root view, the system doesn't have any chance of handling keys like the back button. The event will still not be sent to the framework twice, since we turn off event propagation while re-dispatching the event.
2020-08-28 14:45:38 -07:00
Mehmet Fidanboylu
b237cb1c9c Reland "Pass platform configuration to Dart VM for insecure socket policy (#20733)"
This reverts commit cc5fef5f3266b0088a8ee60e85d6c16ed7748464.
2020-08-27 14:23:31 -07:00
Jason Simmons
7a38d174d5 Ignore calls to AccessibilityBridge listeners after release (flutter/engine#20701)
AccessibilityBridge installs various listeners for Android events
that invoke Flutter engine APIs.  These listeners are removed in
AccessibilityBridge.release.  However, in some environments there may
be deferred calls to the listener that will still execute even after
the listener has been removed.  This change sets a flag during release
and ignores any listener invocations that happen after the flag is set.

See https://github.com/flutter/flutter/issues/63555 and
https://github.com/flutter/engine/pull/17311
2020-08-27 12:24:33 -07:00
renyou
cc5fef5f32 Revert "Pass platform configuration to Dart VM for insecure socket policy (#20733)" (flutter/engine#20812)
This reverts commit 749cede9a0c9692439cd5e585c8578462d285e97.
2020-08-27 08:23:30 -07:00
Gary Qian
cfe1db1146 Use Android R (API 30) getInsets() to compute padding (flutter/engine#18339) 2020-08-26 18:15:40 -07:00
Kaushik Iska
5e969b46ef [embedder] Add gl present callback that takes present info (flutter/engine#20672) 2020-08-26 15:53:01 -07:00
Emmanuel Garcia
eb4c56aba4 Fix EGL_BAD_SURFACE when app is paused (flutter/engine#20735) 2020-08-25 12:39:40 -07:00
Mehmet Fidanboylu
749cede9a0 Pass platform configuration to Dart VM for insecure socket policy (flutter/engine#20733) 2020-08-25 10:56:03 -07:00
Emmanuel Garcia
bb885a23e2 Revert "Enable hybrid composition by default on Android (#20722)" (flutter/engine#20745)
This reverts commit e57e7810a1c62535832abce02393e830fbd7f306.
2020-08-25 09:54:13 -07:00
Emmanuel Garcia
e57e7810a1 Enable hybrid composition by default on Android (flutter/engine#20722) 2020-08-24 13:10:23 -07:00
LI DONGZE
38ad113515 Reporting back native stacktrace to dart side for crash reporting. (flutter/engine#20280)
* Add native stacktrace on iOS

* Add native stacktrace on Android

* format and changing naming to errorWithCode on iOS

* reformat

* Remove stacktrace from decodeEnvelope, not needed.

* Separate encodeErrorEnvelopeWithStacktrace with original encode function

* Add unit tests

* re-format

* change comments for stacktrace

* Remove changes for iOS

Co-authored-by: Ben Li <libe@google.com>
2020-08-21 19:59:36 -07:00
Kaushik Iska
a8c392e6b8 [embedder] Add FBO callback that takes frame info (flutter/engine#20617) 2020-08-19 16:06:02 -07:00
Jason Simmons
72dabb020d Release the AccessibilityBridge when destroying a legacy FlutterView (flutter/engine#20610) 2020-08-19 14:11:02 -07:00
chunhtai
df10c2b3b4 Missing default focus when navigating to a page with no SemanticsNode that sets namesRoute:true (flutter/engine#20516) 2020-08-19 14:06:03 -07:00
Stas Parshin
fa3e19be27 Fix NPE in PlatformViewsController.checkInputConnectionProxy (flutter/engine#20622) 2020-08-19 08:34:04 -07:00
Emmanuel Garcia
a2732e0538 Reland: Create PlatformView instance right after method channel call from Dart (flutter/engine#20568) 2020-08-17 16:28:15 -07:00
gaaclarke
9ef815d6dc Revert "Create PlatformView instance right after method channel call from Dart (#20500)" (flutter/engine#20564)
This reverts commit a87eaedcc22c1b96065222cdf6a05fe32c0b09f0.
2020-08-17 11:17:03 -07:00
Chris Yang
e6ebeb9e68 Only create raster_thread_merge when explicitly requested by the embedding platform (flutter/engine#20487) 2020-08-16 10:31:01 -07:00
Emmanuel Garcia
a87eaedcc2 Create PlatformView instance right after method channel call from Dart (flutter/engine#20500) 2020-08-14 15:06:02 -07:00
Justin McCandless
1fec9ca767 hasStrings on Android (flutter/engine#20393)
hasStrings message for checking for pasteable clipboard contents without actually reading them, for iOS14 clipboard alerts.
2020-08-14 08:45:18 -07:00