Commit Graph

988 Commits

Author SHA1 Message Date
Todd Volkert 4487d392da Replace Java code with equivalent, more concise code. (#7398) 2019-01-07 11:28:00 -08:00
Stanislav Baranov 8cca33aea8 Give more control over when dynamic patches get downloaded and installed. (#7327)
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.
2019-01-02 10:40:37 -08:00
Stanislav Baranov 6f763fbad7 Minor refactoring of dynamic patching code. (#7325)
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.
2018-12-28 13:23:38 -08:00
Stanislav Baranov 868dc047b4 Support loading flutter assets from dynamic patch (#7308)
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.
2018-12-28 10:34:47 -08:00
Amir Hardon f0dd6436c8 Recreate the overlay rendering surfaces if the GrContext was changed. (#7317)
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.

fixes flutter/flutter#24900
2018-12-27 16:02:00 -08:00
Amir Hardon 245317a621 Reland "Only reject gestures to embedded UIViews when the framework sa… (#7315)
This re-lands commit cc9c670, 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.
2018-12-27 13:23:36 -08:00
Stanislav Baranov 732ea7669c Allow dynamic patches without a patch number. (#7309)
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.
2018-12-27 11:56:56 -08:00
Amir Hardon 20ee4e3e9c Revert "Only reject gestures to embedded UIViews when the framework says so. (#7307)" (#7313)
This reverts commit cc9c6702da.
2018-12-27 10:22:51 -08:00
Amir Hardon cc9c6702da Only reject gestures to embedded UIViews when the framework says so. (#7307)
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.
2018-12-26 22:11:10 -08:00
matthew-carroll 6b85ed3d93 Android embedding refactor PR1: JNI Extraction to FlutterJNI.java (#7098)
Android embedding refactor: JNI Extraction to FlutterJNI.java
2018-12-21 01:07:04 -05:00
Jason Simmons 079d604523 Add a system message channel for controlling the Skia resource cache size (#7257)
See https://github.com/flutter/flutter/issues/25244
2018-12-19 17:40:16 -08:00
Jason Simmons 41222d0555 Update usage of some Android APIs that are deprecated in API level 28 (#7261) 2018-12-19 17:39:53 -08:00
Jason Simmons 5ec8ef8509 Remove unused GrContext in AndroidSurfaceGL (#7258) 2018-12-19 15:06:58 -08:00
Stanislav Baranov 9edb4f72b9 Update dynamic patching terminilogy to match that of the flutter tool (#7248) 2018-12-19 10:31:54 -08:00
Dan Field 8b73b9d42c Fix javadoc for Android-28 (#7254)
* Fix javadoc for Android-28

* build javadoc as part of pre-submit
2018-12-19 09:24:02 -08:00
Dan Field cfbc948647 Roll buildroot to support Android SDK 28 (#7245)
* Roll to buildroot and support Android SDK 28

* Ubuntu 16 for android build test
2018-12-18 19:38:28 -08:00
Jason Simmons e8f4968d64 Update iOS unit test for the removal of hex string encoding of uint64 data (#7246) 2018-12-18 11:16:38 -08:00
Todd Volkert fbce2bf145 Fix linter errors in ResourceUpdater (#7240) 2018-12-18 07:40:57 -08:00
Todd Volkert f79f7f6312 Allow inferred types using diamond syntax (#7237) 2018-12-17 16:35:10 -08:00
Todd Volkert 951edf3e11 Simplify nested try-with-resources statements (#7239) 2018-12-17 16:34:54 -08:00
Jason Simmons 42c62a944b Fix destruction of the child object list in the iOS accessibility bridge (#7108)
Fixes https://github.com/flutter/flutter/issues/22206
2018-12-17 16:05:23 -08:00
Jason Simmons 8190e939f5 Simplify conversion of numeric types in the message codec on iOS (#7097)
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
2018-12-17 15:54:57 -08:00
Chris Bracken 08465e8000 Verify RunConfiguration is valid before running (#6922)
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.
2018-12-16 14:07:42 -08:00
Jimmy Casey f986a12e20 Correct spelling in doc comments (#7179)
Applies spelling corrections to accessibility-related doc comments and in the
license tool.
2018-12-16 12:51:00 -08:00
Chris Bracken 67cd7d4d3b Compile embedder unit test Dart to kernel (#7231)
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.

This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.

Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.

This also updates all existing sub-targets to be testonly.

This relands commit ac9e521a1d, which was
reverted in commit 4941125829. Rather than
running as prebuilt_dart_action, we use dart_action to ensure the
frontend snapshot it compatible with the VM on which it's executed.
2018-12-16 12:23:18 -08:00