838 Commits

Author SHA1 Message Date
jslavitz
c57e66fdae
fixes android pressure range (#7516) 2019-01-22 15:09:02 -08:00
Dan Field
2123d3a569
Keep engine alive if VC is not deallocated (#7544) 2019-01-22 15:03:25 -08:00
Jason Simmons
88fee0804c
Remove the shell build target's dependency on the embedder library (#7549) 2019-01-22 14:38:19 -08:00
Brian Osman
50ddc3712f
Remove SkColorSpaceXformCanvas, use color-managed SkSurfaces instead (#7548)
Behavior (visual) changes should be very minor. Things that are to be expected:
* A few things were not color managed correctly by the transform canvas (color emoji, some color filters). Those will be handled correctly with the tagged surfaces (although we're always transforming to sRGB, so nothing should change until we target a wider gamut).
* Image filtering will happen in the source color space, rather than the destination. Very minor.
* The transform canvas did caching of images in the destination color space. Now, the conversion happens at draw time. If there are performance issues, images can be pre-converted to the destination with makeColorSpace().
2019-01-22 15:34:51 -05:00
Dan Field
05fee4eeee
Update default flutter_assets path for iOS embedding (#7518) 2019-01-21 13:43:01 -08:00
KyleWong
5a8b0f3dba When the instance method:init is unavailable, mark the class method:new unavailable. (#7532) 2019-01-20 14:36:13 -08:00
Chinmay Garde
898b4f8da4
Allow embedders to specify AOT snapshot buffers. (#7538) 2019-01-18 16:32:35 -08:00
Dan Field
75cfebde06
Roll buildroot and update method of getting android SDK and support libs (#7284)
* Get support, use new SDK tooling from buildroot
* Roll NDK to 19
* Skip Android bits on Windows with note
2019-01-18 15:20:56 -08:00
Chinmay Garde
a0b4d6b617
Configure the embedder in AOT in "profile" and "release" runtime modes. (#7533) 2019-01-18 12:24:21 -08:00
Chris Bracken
1e93a8eb39
Deprecate FlutterProjectArgs.main_path, packages_path (#7497)
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.
2019-01-16 12:47:39 -08:00
KyleWong
b058920cab Edit the bundleid so that it conform to UIT specifications. (#7503) 2019-01-16 11:35:39 -08:00
Stanislav Baranov
5401803f67
Validate dynamic patches before attempting to install (#7496)
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.
2019-01-15 18:09:25 -08:00
Brian Osman
8a3fb3186f
Switch to new SkColorSpace factory (#7480) 2019-01-15 09:50:46 -05:00
Jason Simmons
395937380c
Log errors returned from method channel invocations in the text input plugin (#7476)
See https://github.com/flutter/flutter/issues/25715
2019-01-14 17:26:05 -08:00
Dan Field
9004af1341
Allow FlutterViewController to be released when not initialized with an engine (#6879)
* Break cycle between FlutterViewController and FlutterEngine
2019-01-14 16:58:09 -08:00
Dan Field
9d206e2726
iOS A11y memory leak (#7244)
* fix memory leak in a11y bridge
2019-01-14 16:47:19 -08:00
Greg Spencer
918b28dbe1
Add hover event support to the engine (#6961)
This adds support for passing ACTION_HOVER_MOVE events to the framework, in preparation for supporting mouse hover events on Android and ChromeOS.
2019-01-14 16:15:20 -08:00
Chris Bracken
d1d8b4d416
Stop pumping frames in applicationWillResignActive (#7450)
According to Apple's [OpenGL ES Programming guide][1], applications
should pause any animations in applicationWillResignActive. Any GL calls
after applicationDidEnterBackground will cause the app to be terminated
immedidately by iOS.

The surfaceUpdated:YES call is moved to the handler for the
applicationDidBecomeActive notification to handle cases where the
application becomes inactive then active again without being
backgrounded (e.g. home button double-tap then return to app directly).

[1]: https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/ImplementingaMultitasking-awareOpenGLESApplication/ImplementingaMultitasking-awareOpenGLESApplication.html#//apple_ref/doc/uid/TP40008793-CH5-SW1
2019-01-12 09:14:23 -08:00
Justin McCandless
3f99878315
Match the ios number input type behavior to what is said in the docs (#7281) 2019-01-11 10:24:00 -08:00
木士羽
5272805f13 Fix settings.advisory_script_uri in iOS createShell (#7235) 2019-01-10 12:09:37 -08:00
Stanislav Baranov
37d886ef85
Simplify rollback of dynamic patches (#7432) 2019-01-09 17:29:04 -08:00
Stanislav Baranov
6071286ef1
Download dynamic patch to separate file, then rename it to install. (#7428)
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.
2019-01-09 16:26:24 -08:00
Chinmay Garde
26e02aaa23
Wire up support for external OpenGL textures for the embedder. (#7087) 2019-01-09 15:21:39 -08:00
Chris Bracken
20d70d2bf4
Eliminate unused import of ZipException (#7429)
Use of this class was eliminated in https://github.com/flutter/engine/pull/7398.
2019-01-09 15:08:43 -08:00
Stanislav Baranov
844d27cb3c
Refactor dynamic patching to use clearer naming and structure. (#7426)
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.
2019-01-09 14:21:36 -08:00
Stanislav Baranov
5e33f33a18
Refactor shared code into separate function to simplify further work. (#7410)
This should be a no-op change that behaves identical to as before.
2019-01-08 12:44:07 -08:00
David Guralnick
8eccb860de Add onStart hook to FlutterFragmentActivity (#6719)
Seems like this file was missed when onStart hooks were added recently in this pull request: https://github.com/flutter/engine/pull/5177
2019-01-07 17:16:06 -05:00
Dan Field
5ca8aadaa2
Announce in/out of list (#6918)
* Support in/out of list announcements on Android
2019-01-07 13:36:20 -08:00
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 cc9c6702da5b8f0db4753c0e6a4a2002670941d6.
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
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