This should satisfy the low-latency need of DevTools.
Test added:
* ReportTimingsIsCalledSoonerInNonReleaseMode
* ReportTimingsIsCalledLaterInReleaseMode
In some cases, the window needs to be redrawn without a resize. This
adds a callback for that case to trigger a repaint.
Since there's no embedding API for repainting, trigger it with a window
metrics event using the current window size.
Fixes https://github.com/flutter/flutter/issues/30731
Previously AOT compiled Dart code would be packaged as a group of assets
within the APK. This has been replaced by a single ELF library containing
the same data.
For https://github.com/flutter/flutter/issues/33807
We still need to make layers' children immutable for full immutability.
That will require us to change the SceneBuilder API to build the layer
bottom up instead of top down (post-order traversal instead of pre-order
traversal).
#9203 broke the keyboard_resize integration test(see more details in flutter/flutter#34085 (comment)).
This re-lands @9203 and fixes the issue the integration test uncovered by always allowing to hide the keyboard.
The difference from the original change is 07d2598
Generally what this PR is doing is setting up a delegation mechanism
for Android's onCreateInputConnection.
It works by letting the framework know when an embedded view gets loses
focus(within the virtual display), the framework maintains a focus node
for each Android view that is kept in sync with the focus state of the
embedded view.
The TextInputPlugin is extended to allow for 2 type of text clients a
"framework client"(what we had before) and a "platform view client".
When the AndroidView's focus node in the framework is focused the
framework sets a "platform view text client" for the TextInputPlugin,
which will result in the TextInputPlugin delegating
createInputConnection to the platform view.
When a platform view is resized, we are detaching it from a virtual
display and attaching it to a new one, as a side affect a platform view
might lose an active input connection, to workaround that we "lock" the
connection when resizing(by caching it and forcing the cached copy until
the resize is done).
Additional things worth calling out in this PR:
To properly answer which views are allowed for input connection
proxying we compare a candidate view's root view to the set of root
views of all virtual displays.
We also preserve a view's focus state across resizes.
Note that this PR only wires text for the io.flutter.view.FlutterView
For the new Android embedding some additional plumbing is necessary.
Corresponding framework PR: flutter/flutter#33901flutter/flutter#19718
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.
Related issues:
https://github.com/flutter/flutter/issues/26154https://github.com/flutter/flutter/issues/31444https://github.com/flutter/flutter/issues/32447
Need review as soon as possible so we can merge this before the end of May to catch the milestone.
Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format
This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
This adds the key event source from Android so that the framework can differentiate between keyboard events and game controller events. Also added vendor and product ids so that Flutter code can decide to do special processing based on the kind of device, if desired.
This regression was introduced in #7847.
The PlatformViewsChannel method call handler was always setting the result to `notImplemented` even after handling a result, this resulted in a "Reply already submitted" exception being thrown.
Note that the method channel code is swallowing this exception and logging an error, so we didn't crash instead we were logging an error(this is why the integration test didn't fail).
Filed https://github.com/flutter/flutter/issues/33863 to make sure tests fail when such exceptions are thrown.
This PR also cleans up an unused `NoSuchPlatformViewException` that was introduced in #7847.
https://github.com/flutter/flutter/issues/33866
The podspec must be copied to the build output root, otherwise
--local-engine won't work in projects containing plugins.
Mirrors the iOS podspec copy rule.
FlutterMain.findAppBundlePath is using the presence of the flutter_assets
directory as a signal that the app is initialized. For consistency,
FlutterMain will run the resource extractor at startup and create
flutter_assets even if no resources need to be extracted.
* Allow specifying both Dart and non-Dart fixtures in engine unittests.
This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.
* Instead of only being able to specify Dart fixtures, unit-tests may specify
non-Dart fixtures as well. These are simply copied over to the fixtures
directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
has been addressed. It was anticipated that such a (legal) invocation to the
kernel snapshotter would produce a snapshot with the contents of all the Dart
files added to the root library. This is incorrect and the behavior in this
case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
arguments (`—strong`) and the use of the VM product mode argument has been
corrected to no longer depend on the Flutter product mode.
As another step toward aligning the macOS plugin API with the iOS plugin
API, and with its final form, rename the plugin-related classes from
FLEPlugin* to FlutterPlugin*. This makes the names of the clasess the
same between iOS and macOS. Eventually they should actually merge, with
annotations/ifdefs for platform differences, but for now since the macOS
version uses the same method names and is simply a subset of the iOS
APIs (with one to-be-stabilized method that is macOS-specific) doing the
merge later won't be a breaking change.
Doing this now allows for building out plugin tooling and plugin
implementations on macOS without creating a growing body of code that
will experience a breaking change later.
See:
https://github.com/flutter/flutter/issues/31735https://github.com/flutter/flutter/issues/32718
In breaking change flutter/engine#4487, a typo was fixed in our Android
APIs correcting RequestPermissionResult to RequestPermissionsResult
(note the 's' on Permissions) for consistency with the Android SDK.
Various tombstone comments were left to help guide developers in the
right direction. These comments were slated for removal in March of
2018; at over a year later, we can probably safely remove them.
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.
Made use of `misspell` tool:
https://github.com/client9/misspell