730 Commits

Author SHA1 Message Date
Jonas Uekötter
d2c1514084 Write MINIMAL_SDK to exception message (#11345)
This changes writes the required and current Android SDK level to the exception message. This enables Crash Reporting tools to capture more information about this crash.
2019-09-23 17:20:26 -07:00
Matt Carroll
70f21b0edb Fixes race condition that was reported internally. (#12362) 2019-09-19 16:36:17 -07:00
Dan Field
7fb14000fd
java lints (#12354) 2019-09-18 21:20:04 -07:00
Matt Carroll
36be89da49
Added javadoc comments to FlutterActivity and FlutterFragmentActivity. (#12328) 2019-09-17 16:22:13 -07:00
Matt Carroll
f38f3a2f79
Introduce FlutterFragmentActivity (#12305) 2019-09-17 15:09:38 -07:00
rafern
caf1df6b58 Tests for #11283 (#12322)
Added tests for #11283. The itEncodesNullObjects test fails with the branch before the merge and succeeds with the master branch
2019-09-17 13:52:40 -07:00
Jason Simmons
783deab110
Fix the declaration of setSystemGestureExclusionRects to match the PlatformMessageHandler interface (#12306) 2019-09-16 16:26:39 -07:00
rafern
63873d9f42 Fix objects equal to null not being detected as null (#11283) 2019-09-16 12:16:38 -07:00
Michael Goderbauer
ef7bcafd5c
a11y: expose max character count for text fields (#12269) 2019-09-16 09:37:25 -07:00
Michael Klimushyn
dfa9498360
Enable platform view keyboard input on Android Q (#12085)
Naively embedded platform views on Android were never able to receive
keyboard input, because they were never focusable. So far we've worked
around the limiation by hooking into InputMethodManager and proxying the
InputConnection from a focused window over to the embeded view.

Android Q changed InputMethodManager to be instanced per display instead
of a singleton. Because of this our proxy hook was never being called,
since it was being set up on a different instance of IMM than was being
used in the virtual display.

Update `SingleViewPresentation` to store the IMM from the focused window
and return it whenever there are any calls to `INPUT_METHOD_SERVICE`.
This hooks our proxy back into place for the embedded view in the
virtual display. This restores the functionality of our workaround from
previous versions.

Unfortunately there's still a lot of noisy error logs from IMM here. It
can tell that the IMM has a different displayId than what it's expecting
from the window.

This also updates the unit tests to support SDK=27. SDK 16 doesn't have
DisplayManager, so there were NPEs attempting to instantiate the class
under test.
2019-09-12 09:50:54 -07:00
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