As of Dart 2, running from Dart source is no longer supported. Dart
code should now be compiled to kernel form and will be loaded by from
kernel.blob in the assets directory. We retain the struct members for ABI
stability. package_path is also not required since kernel blobs are
self-contained.
This change adds explicit validation of dynamic patches in all places
where they're used, instead of only validating it in some places which
wasn't as reliable because some of the code paths were missed.
This change also moves utility functions that deal with validating
patches from ResourceExtractor to ResourceUpdater, to make them
available as API for other places in code that need this validation.
This fixes potential race condition when patch gets downloaded on top
of zip file that's currently in active use by resource extractor and/or
asset manager. This change is necessary since download can happen in
the background while normal application operations are in progress.
This is a no-op change, except for fixing a bug where download task
reference wasn't cleared after download was completed.
This change also removes call to output stream flush(), which is not
necessary according to Java spec.
The rest of the change deals with requiring the code to work directly
with ResourceUpdater object instead of having FlutterMain be a facade
that forwards some of ResourceUpdater's methods. This simplifies the
other (more essential) upcoming changes that will be landing in the
followings few PRs.
This change introduces manifest properties that control when dynamic patches are downloaded and installed in the application lifecycle.
Application developer can choose whether between install on restart, install on resume, or immediate forced install of dynamic patches.
Minor refactoring of dynamic patching code.
- Changes naming of manifest properties to be consistent with documentation.
- Moves methods from inner class to outer class to make them more reusable.
This replicates similar logic found in ApkAssetProvider that locates assets by their short name in a sudbirectory inside of an archive file, instead of only at the root of archive.
When the app is sent to the background and then brought to the forward it is possible that the GrContext was changed.
This resulted in overlay surfaces not being updated after being backgrounded and foregrounded.
This change makes sure to re-create the overlay rendering surfaces if the GrContext for the main surface was changed.
fixesflutter/flutter#24900
This re-lands commit 94b7921, with a few fixes:
- Keep the DelayingGestureRecognizer a discrete gesture recognizer, when it was set to a began state embedded WkWebViews wasn't receiving touch events.
- Fix a bug of not retaining the forwardRecognizer pointer when assigning it to a scoped_nsobject.
Unique patch numbers are mainly useful for canary and A-B testing, but otherwise complicate things and can now be omitted.
Also, always append .zip to patch download URL. This obviates the need to configure redirects on the server when not using patch numbers.
Previously the framework could only tell the engine to forward a touch
sequence to an embeded UIView between the time touches has started and
the time touches ended. This couldn't support gesture arena setups where
the gesture is recognized after the touch sequence is complete (e.g a
tap competing with a scroll).
This change makes it so that a touch gesture is only finally rejected by
a platform view when the framework invokes the `rejectGesture` method.
This allows the framework to resolve a gesture conflict after the touch
sequence was ended.
Consistently handle Int32/Int64 types on both 32-bit and 64-bit versions
of iOS. Drop usage of the obsolete hex string encoding for BigInt types.
Fixes https://github.com/flutter/flutter/issues/21313
In cases where a valid IsolateConfiguration cannot be inferred, (e.g.,
settings.kernel_list_asset is missing) RunConfiguration can be created
with a null IsolateConfiguration. In such cases, bail out early with
kInvalidSettings.
Also adds a redundant paranoid check to EmbedderEngine::Run.