810 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 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
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 ac9e521a1ddbb99816a93d92ce9fb70e950b3763, which was
reverted in commit 494112582932af98b282617d7a34b1fbb8c90307. 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
Chris Bracken
4941125829
Revert "Compile embedder unit test Dart to kernel (#7227)" (#7230)
This reverts commit ac9e521a1ddbb99816a93d92ce9fb70e950b3763.

This broke dynamic release mode builds of
//flutter/runtime:runtime_fixtures_kernel (likely all product-mode
builds).
2018-12-15 14:43:26 -08:00
Chris Bracken
ac9e521a1d
Compile embedder unit test Dart to kernel (#7227)
Compile embedder unit test Dart to kernel

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.
2018-12-15 13:59:58 -08:00
Ian Hickson
8a7ae957ff
Undeprecated BigInteger support, but document what it actually does. (#6903) 2018-12-15 08:32:20 -08:00
jslavitz
1a2714bbef
Adds force cursor support (#6945)
* engine force cursor support
2018-12-13 18:45:38 -08:00
Stanislav Baranov
18a4e33c2a
Downloading and installation of dynamic updates on Android (#7207) 2018-12-13 10:17:37 -08:00
Justin McCandless
571f47457c
Update marked text before selection so textInRange is never called with (#6989)
invalid input
2018-12-12 15:32:36 -08:00
liyuqian
2bd75ae8ba
Support querying display refresh rate in engine (#7002)
The current implementation only deals with Android devices and we'll add iOS devices support soon.
2018-12-12 10:28:44 -08:00
Brian Salomon
e5195ee479 Remove unnecessary includes of Ganesh headers (#7189) 2018-12-12 10:58:14 -05:00
Rafael Ring
9071a39dd2 Fix keyboard not showing for targetSdk 28 (#6985)
After bumping the targetSdk of Flutter apps to 28, the keyboard doesn't open anymore when inputting text on an Android Pie devices. The problem is caused by a change on the way the focus in handled: when the call `mImm.showSoftInput(view, 0);` is made, the currently focused view is the `DecorView` from the `Activity` hosting Flutter but the passed view reference (`view` argument) is the `FlutterView`. As the `InputMethodManager` checks if both views are the same before showing the keyboard, it never appears because the `FlutterView` never has focus.
As Flutter doesn't have any input views as far as the Android side is concerned, the focus should always stay on the `FlutterView` itself and thus, this PR changes the `TextInputPlugin` to focus on the `FlutterView` as soon as it's created, fixing the keyboard issue.

Co-authored-by: Igor Borges <igorborges12@gmail.com>
2018-12-10 21:01:12 -08:00
Chris Bracken
97d96bc9a5
Eliminate obsolete FlutterDartProject initializers (#6967)
Technically both of these are part of the public API exposed in
Flutter.framework. Neither is used within Flutter itself, and both have
been broken since the removal of Dart 1 support, so eliminating rather
than marking unavailable.
2018-12-10 17:07:00 -08:00
Jason Simmons
3011c2b754
Handle null bundlePaths in FlutterRunArguments (#7161) 2018-12-10 14:38:44 -08:00
Stanislav Baranov
be36ba6468
Generalize runFromBundle to support multiple bundlePaths (#7151) 2018-12-10 12:19:22 -08:00
Chris Bracken
dcfae4e803
Eliminate main_dart_file_path, package_file_path (#6973)
These settings were specific to Dart 1 and are no longer used in the
engine. This eliminates them from the Settings class.
2018-12-10 09:12:10 -08:00
Gary Qian
72c7a75672
Prepend [NSLocale currentLocale] for first locale on iOS to ensure countryCode exists. Allow language-only locales. (#6995) 2018-11-28 12:59:57 -08:00
Chris Bracken
25d99cd257
Use software renderer in embedder unittests (#6928)
Reduces spurious error log messages in GLContextMakeCurrent() attempting
set up the GR context:

  [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(42)] Could not make the context current to setup the gr context.
2018-11-26 10:48:37 -08:00
Dan Field
df2e9393a2
load default splash screen when not init with engine (#6925) 2018-11-21 15:06:08 -08:00
Dan Field
c02dd8f935
Don't load a splash screen by default (#6883) 2018-11-16 12:43:18 -08:00
Michael Goderbauer
e6f22b74e6
Fix license headers (#6868)
These sneaked in between https://github.com/flutter/engine/pull/6757 and https://github.com/flutter/engine/pull/6759.
2018-11-15 14:12:57 -08:00
Ben Konyi
f23862b259
Added delegate forwarding for didReceiveLocalNotification and willPresentNotification (#6858) 2018-11-14 11:39:47 -08:00
Dan Field
110a5f320c
Reset a11y bridge state on hot restart (#6857) 2018-11-14 11:13:39 -08:00
Dan Field
114d33d3ca
Set and unset accessibility flags even when re-entrant (#6853)
* Make sure to not unset a11y flags on reentrant calls to API
2018-11-13 23:54:45 -08:00
Michael Goderbauer
1e7e676e4d
Remove unused import (#6854) 2018-11-13 23:31:56 -08:00
Dan Field
0d0287780e
Avoid a never-disappearing splash screen if the engine came from somewhere else on iOS (#6834)
* Ignore multiple attemps to set splash screen, print warning
2018-11-13 16:04:09 -08:00
Michael Goderbauer
09ef73ff6e
Fix code smells reported by chrome's clang plugin (#6833) 2018-11-12 19:59:29 -08:00
Dan Field
ea4bbbd440
Avoid announcing text field when it lacks a11y focus (#6830)
* Avoid announcing text field when it lacks a11y focus
2018-11-12 16:08:59 -08:00
Amir Hardon
266b0986de
Release the surface texture entry when the platform view is disposed. (#6829)
We were leaking the texture after the view was disposed.
2018-11-12 14:23:25 -08:00