720 Commits

Author SHA1 Message Date
Emmanuel Garcia
50bdbd769e
Document dependencies and remove support-v13 (#11912) 2019-09-06 15:25:59 -07:00
Matt Carroll
ef2a452124
Remove un-needed FragmentActivity import statements to facilitate proguard. (#11902) 2019-09-05 14:44:04 -07:00
Emmanuel Garcia
edee1fea58
Add @Keep annotation (#11893) 2019-09-05 13:23:04 -07:00
Shi-Hao Hong
14e41878ad
Incorporate View.setSystemGestureExclusionRects code review feedback from #11441 (#11804)
* Improve variable naming and javadoc for setSystemGestureExclusionRects

* Remove variables from setSystemGestureExclusionRects tests

* Split test for two behaviors into two separate tests for setSystemGestureExclusionRects success case
2019-09-05 12:53:41 -07:00
Shi-Hao Hong
898480fe05
Android 10+ View.getSystemGestureExclusionRects (#11451)
* SystemGesture.getSystemGestureExclusionRects

* Add getSystemExclusionRects unit tests
2019-09-04 15:13:02 -07:00
Matt Carroll
fde7c8c334
Rename first frame method and notify FlutterActivity when full drawn (#38714 #36796). (#11357) 2019-09-03 15:49:53 -07:00
Matt Carroll
dce8a34048
Revert "Notify framework to clear input connection when app is backgrounded (#35054) (#9498)" (#11720)
This reverts commit 4003fbc3ed48865cf6993d01be60749c3cabeff5.
2019-08-29 15:42:11 -07:00
Shi-Hao Hong
7024722e38
Android 10+ View.setSystemGestureExclusionRects (#11441)
* Implement SystemGesture.setSystemGestureExclusionRects platform channel

* Add PlatformChannelTest.java

* Fix typo in android/test/README.md
2019-08-29 17:00:42 -04:00
xster
fd25f80a1d
make it possible to disable debug symbols stripping (#11265) 2019-08-26 16:53:00 -07:00
Tong Mu
ba1a303ae2
Patch buttons for chromebook touchpad (#11420)
Changes irregular events of touchpad scrolling on Chromebook to have buttons: 1.
2019-08-26 11:49:55 -07:00
Chinmay Garde
139a9a799c
Avoid root surface acquisition during custom composition with software renderer. (#11394)
Uses the same technique used during OpenGL composition to elide root surface access. The refactoring of this approach is tracked in https://github.com/flutter/flutter/issues/38466

Fixes https://github.com/flutter/flutter/issues/39009.
2019-08-23 13:52:06 -07:00
Amir Hardon
0345967a19
Include Java stack trace in method channel invocations (#11361) 2019-08-22 09:02:31 -07:00
Emmanuel Garcia
4f8b166905
Remove engine hash from the output artifact (#11330) 2019-08-21 13:27:55 +00:00
Matt Carroll
df178fd936
Remove dart entrypoint Intent parameter from FlutterActivity. (#38713) (#11239) 2019-08-19 17:21:21 -07:00
Matt Carroll
4003fbc3ed
Notify framework to clear input connection when app is backgrounded (#35054) (#9498) 2019-08-19 14:12:45 -07:00
Michael Klimushyn
e23a2e22ec
More updates to the Robolectric test harness (#11068)
Previously the test wasn't correctly re-building the engine when its
files changed on multiple runs of `testing/run_tests.py`. It looks like
this is because the test build target wasn't depending on the entire
engine Android dependency, so some code changes were being ignored.
Update the build.
2019-08-16 17:09:09 -07:00
Shi-Hao Hong
014ab76ad0
Pass Android Q insets.systemGestureInsets to Window (#10413)
* Pass Android Q system gesture inset information from insets.systemGestureInsets to Window.systemGestureInsets
2019-08-16 13:42:56 -04:00
Jason Simmons
8569edc551
Disable a deprecation warning for use of a TaskDescription constructor for older platforms (#11029) 2019-08-15 15:22:37 -07:00
Jason Simmons
cf6648313d
Remove the output directory prefix from the Android engine JAR filename (#11015) 2019-08-15 09:42:19 -07:00
inthroxify
2e8e6932a6 Fix flutter/flutter #34791 (#9977)
This is a fix for [flutter/flutter issue #34791](https://github.com/flutter/flutter/issues/34791).

PR #8048 in flutter/engine produced a bug/regression (flutter/flutter #34791) in flutter for Android that doesn't permit the Recents app bar color to be changed. This restores the original arguments to the function found in the previous version (2f4a38dbd3/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java) of PlatformPlugin.java while preserving the enhancements for the linter.

I've compiled and tested this fix locally. The bar changes color again.
2019-08-15 09:20:30 -07:00
xster
5e155c6c2d
some drive-by docs while I was reading the embedding classes (#9341) 2019-08-14 16:35:50 -07:00
Chinmay Garde
e8f954409d
Allow embedder controlled composition of Flutter layers. (#10195)
This patch allows embedders to split the Flutter layer tree into multiple
chunks. These chunks are meant to be composed one on top of another. This gives
embedders a chance to interleave their own contents between these chunks.

The Flutter embedder API already provides hooks for the specification of
textures for the Flutter engine to compose within its own hierarchy (for camera
feeds, video, etc..). However, not all embedders can render the contents of such
sources into textures the Flutter engine can accept. Moreover, this composition
model may have overheads that are non-trivial for certain use cases. In such
cases, the embedder may choose to specify multiple render target for Flutter to
render into instead of just one.

The use of this API allows embedders to perform composition very similar to the
iOS embedder. This composition model is used on that platform for the embedding
of UIKit view such and web view and map views within the Flutter hierarchy.
However, do note that iOS also has threading configurations that are currently
not available to custom embedders.

The embedder API updates in this patch are ABI stable and existing embedders
will continue to work are normal. For embedders that want to enable this
composition mode, the API is designed to make it easy to opt into the same in an
incremental manner.

Rendering of contents into the “root” rendering surface remains unchanged.
However, now the application can push “platform views” via a scene builder.
These platform views need to handled by a FlutterCompositor specified in a new
field at the end of the FlutterProjectArgs struct.

When a new platform view in introduced within the layer tree, the compositor
will ask the embedder to create a new render target for that platform view.
Render targets can currently be OpenGL framebuffers, OpenGL textures or software
buffers. The type of the render target returned by the embedder must be
compatible with the root render surface. That is, if the root render surface is
an OpenGL framebuffer, the render target for each platform view must either be a
texture or a framebuffer in the same OpenGL context. New render target types as
well as root renderers for newer APIs like Metal & Vulkan can and will be added
in the future. The addition of these APIs will be done in an ABI & API stable
manner.

As Flutter renders frames, it gives the embedder a callback with information
about the position of the various platform views in the effective hierarchy.
The embedder is then meant to put the contents of the render targets that it
setup and had previously given to the engine onto the screen (of course
interleaving the contents of the platform views).

Unit-tests have been added that test not only the structure and properties of
layer hierarchy given to the compositor, but also the contents of the texels
rendered by a test compositor using both the OpenGL and software rendering
backends.

Fixes b/132812775
Fixes flutter/flutter#35410
2019-08-13 14:53:19 -07:00
Michael Klimushyn
ed88d0a44d
Change SemanticsNode#children lists to be non-null (#10952)
Prevents NPEs and simplifies the code needed to handle these collections. There doesn't seem to have been a meaningful difference between null and empty collection here. The specific crash was happening when `object.scrollChildren > 0` while `object.childrenInHitTestOrder == null`, which looks like it may be a bug on its own and probably needs further investigation.
2019-08-12 17:16:59 -07:00
Michael Klimushyn
c92a0d992a
Report JUnit test failures (#10941)
Previously this script was not reporting any JUNit failures and somehow
ended up included a non-existent jar for Java tests to test against.

It looks like one of the JUnit tests is now failing. Disabling it for
now to turn on CI again as soon as possible, will fix and enable it in a
follow up.
2019-08-12 12:17:15 -07:00
Emmanuel Garcia
83b640d4b4
Rename flutter_java.jar and flutter_engine.jar so they match the Maven comvention (#10797) 2019-08-09 10:14:33 -07:00
Emmanuel Garcia
3103499019
Include Maven dependency in files.json (#10719) 2019-08-08 18:59:22 -07:00
Jason Simmons
622d67fb58
Build JARs containing the Android embedding sources and the engine native library (#10778) 2019-08-08 18:11:29 -07:00
Jason Simmons
d9bbe37ce3
Remove use of the deprecated AccessibilityNodeInfo boundsInParent API (#10773) 2019-08-08 15:25:56 -07:00
Matt Carroll
735255f36a
Android embedding refactor pr40 add static engine cache (#10481) 2019-08-06 16:15:21 -07:00
Jason Simmons
26368225b5
Fix deprecation warnings in the Android embedding (#10424) 2019-08-01 18:13:27 -07:00
Dan Field
ed8e35c4cf
Remove get engine (#9747) 2019-07-30 17:11:04 -07:00
Matt Carroll
4c6948a88a
Android Embedding Refactor 38: Removed AssetManager from DartEntrypoint. (#10250) 2019-07-30 12:57:01 -07:00
Matt Carroll
f336e05a69
Android Embedding PR37: Separated FlutterActivity and FlutterFragment via FlutterActivityAndFragmentDelegate (#9895) 2019-07-29 17:40:25 -07:00
Michael Klimushyn
839f9a2707
Deprecate FlutterView#enableTransparentBackground (#10235)
The API breaks accessibility highlighting because of
SurfaceView#setZOrderOnTop. Deprecate it since the underlying issue is
an Android SDK one that can't be worked around from within a
SurfaceView.
2019-07-29 12:46:26 -07:00
Michael Klimushyn
67524615be
Add better CIPD docs. (#10185)
Also commits cipd.yaml to source.
2019-07-26 15:39:48 -07:00
Jonah Williams
be9b245690
add suggested changes from flutter roll (#10176) 2019-07-26 12:56:08 -07:00
adazh
ef99738baf
Added a DartExecutor API for querying # of pending channel callbacks (#10021) 2019-07-23 13:11:03 -07:00
Michael Klimushyn
8ed5da8b65
Add working Robolectric tests (#9954)
`gclient sync` now grabs Robolectric, JUnit, and their transitive
runtime dependencies. They're being stored in a new CIPD package,
`flutter/android/robolectric_bundle`.

`shell/platform/android/BUILD.gn` has a new target for building the
tests, `robolectric_tests`. `testing/run_tests.py` has been extended to
build and run the new target. Runs the android tests under
"build_and_test_android" on CI.

This also adds some very simple sample tests to start with and a README
to the java tests directory.
2019-07-23 09:06:19 -07:00
Justin McCandless
4decc174ee
Add support for Android's visible password input type (#9999)
For framework PR https://github.com/flutter/flutter/issues/31738
2019-07-23 07:57:39 -07:00
Matt Carroll
3aaeca3a57
Android Embedding Refactor PR36: Add splash screen support. (#9525) 2019-07-22 14:01:34 -07:00
Matt Carroll
9cf13568e2
Added hasRenderedFirstFrame() to old FlutterView for Espresso (#36211). (#9939) 2019-07-19 16:46:02 -07:00
Matt Carroll
649e025f70
Removed PlatformViewsController if-statements from TextInputPlugin (#34286). (#9938) 2019-07-19 13:52:45 -07:00
Mouad Debbar
8849d3092d
Add multi-line flag to semantics (#9850) 2019-07-17 09:51:09 -07:00
Amir Hardon
7ae3c3e112
Preserve the alpha for VD content by setting a transparent background. (#9849)
The previous attempt to do this by setting the theme to
Theme_Translucent_NoTitleBar was reported to offsetting touch events on
specific Xiaomi devices.
2019-07-16 12:45:20 -07:00
Amir Hardon
74af88ba9f
Make the virtual display's window translucent (#9828)
By default alpha is not preserved for the VD's contents.
We make the window translucent as a side effect of doing so is preserving alpha.
There should not be extra performance cost for setting the window to be translucent as there is only a single window within the VD.

Fixes flutter/flutter#33756
2019-07-15 16:51:36 -07:00
Jason Simmons
3c9a22c778
Fall back to a fully qualified path to libapp.so if the library can not be loaded by name (#9762)
libapp.so contains compiled application Dart code.  On most Android systems,
this library can be loaded by calling dlopen("libapp.so"), which will search
Android's default library directories.

On some Android devices this does not work as expected.  As a workaround, this
patch provides a fallback path to libapp.so based on ApplicationInfo.nativeLibraryDir.

Fixes https://github.com/flutter/flutter/issues/35838
2019-07-11 12:39:42 -07:00
Michael Klimushyn
a03e747435
Add hooks for InputConnection lock and unlocking (#9727)
With this, plugins can know whether or not their input connection should
be cached. In very rare cases this can be used by plugins to know how to
more properly handle their own input connections, in cases where they're
overriding typical input behavior themselves.
2019-07-11 09:47:35 -07:00
Gary Qian
fa7627d17c
Fix backspace crash on Chinese devices (#9734) 2019-07-10 12:08:03 -07:00
Matt Carroll
56a3f41027
Android Embedding Refactor PR31: Integrate platform views with the new embedding and the plugin shim. (#9206) 2019-07-01 17:34:37 -07:00
Matt Carroll
628b174c9b
Fixes a plugin overwrite bug in the plugin shim system. (#9589) 2019-07-01 15:26:22 -07:00