97 Commits

Author SHA1 Message Date
Amir Hardon
0345967a19
Include Java stack trace in method channel invocations (#11361) 2019-08-22 09:02:31 -07: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
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
xster
5e155c6c2d
some drive-by docs while I was reading the embedding classes (#9341) 2019-08-14 16:35:50 -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
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
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
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
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
Jason Simmons
3f4f606105
Simplify loading of app bundles on Android (#9360)
* Remove deprecated runBundle APIs
* Remove code related to dynamic patching (including support for multiple
  bundle paths)
* Change FlutterRunArugments.bundlePath to be the Android AssetManager path
  where the app's assets are located
2019-06-25 14:17:50 -07:00
Matt Carroll
ae8e6d9f46
Removed unused imports in new embedding. (#9463) 2019-06-25 01:59:33 -07:00
Matt Carroll
a2db2ea6f1
Android Embedding Refactor PR35: Ensure all JNI methods are in FlutterJNI (#34751). (#9391) 2019-06-20 17:13:58 -07:00
Matt Carroll
3bcd6a8f7b
Android Embedding Refactor PR34: Fill in missing nullability annotations. (#9384) 2019-06-19 23:44:15 -07:00
Dan Field
7c4f6a6830
Wire intent args for observatory port (#9378) 2019-06-19 13:13:13 -07:00
Matt Carroll
66db3d58e3
Add APIs for querying FlutterView for a FlutterEngine and listening for attachment/detachment (#29114). (#9356) 2019-06-18 16:34:30 -07:00
Matt Carroll
f2e76a8922
Android Embedding Refactor PR32: Clean up logs in new embedding (#33544, #33102). (#9351) 2019-06-18 15:52:22 -07:00
Matt Carroll
36f18b0ae4
Android Embedding Refactor PR33: Clean up FlutterJNI (#25533). (#9354) 2019-06-18 15:35:22 -07:00
Jason Simmons
fcff2d619c
Use the DartServiceIsolate status callback to publish the observatory URI to the Android embedder (#9337)
The Android embedder had been using a JNI call to get the observatory URI from
DartServiceIsolate.  This call was not thread safe and was redundant with the
server status callback mechanism used on iOS.
2019-06-17 16:17:29 -07:00
Jason Simmons
ea7ca9804a
Send the isolate service ID from the engine to the embedder (#9324)
Applications can use an embedder API to obtain the isolate ID and then use it
in calls to the Dart service protocol.
2019-06-17 16:02:26 -07:00
Matt Carroll
4fc95ebb29
Fixed memory leaks within FlutterFragment and FlutterView (#34268, #34269, #34270). (#9288) 2019-06-11 17:01:20 -07:00
Matt Carroll
2d2cfc0884
Expose a hasRenderedFirstFrame() method in FlutterView (#34275). (#9285) 2019-06-11 15:47:04 -07:00
Matt Carroll
2d0103a8fe
Removed VIRTUAL_KEYBOARD check in TextInputPlugin because it's blocking Espresso work and its purpose is unknown. (#9238) 2019-06-10 13:30:39 -07:00
Amir Hardon
259d334e05
Reland "Keyboard support for embedded Android views. (#9203) (#9257)
#9203 broke the keyboard_resize integration test(see more details in flutter/flutter#34085 (comment)).

This re-lands @9203 and fixes the issue the integration test uncovered by always allowing to hide the keyboard.

The difference from the original change is 07d2598
2019-06-10 12:56:35 -07:00
Jonah Williams
ddd36e8338
Revert "Keyboard support for embedded Android views. (#9203)" (#9239) 2019-06-07 18:21:57 -07:00
Amir Hardon
e80df363d2
Keyboard support for embedded Android views. (#9203)
Generally what this PR is doing is setting up a delegation mechanism
for Android's onCreateInputConnection.

It works by letting the framework know when an embedded view gets loses
focus(within the virtual display), the framework maintains a focus node
for each Android view that is kept in sync with the focus state of the
embedded view.

The TextInputPlugin is extended to allow for 2 type of text clients a
"framework client"(what we had before) and a "platform view client".
When the AndroidView's focus node in the framework is focused the
framework sets a "platform view text client" for the TextInputPlugin,
which will result in the TextInputPlugin delegating
createInputConnection to the platform view.

When a platform view is resized, we are detaching it from a virtual
display and attaching it to a new one, as a side affect a platform view
might lose an active input connection, to workaround that we "lock" the
connection when resizing(by caching it and forcing the cached copy until
the resize is done).

Additional things worth calling out in this PR:

To properly answer which views are allowed for input connection
proxying we compare a candidate view's root view to the set of root
views of all virtual displays.
We also preserve a view's focus state across resizes.
Note that this PR only wires text for the io.flutter.view.FlutterView
For the new Android embedding some additional plumbing is necessary.

Corresponding framework PR: flutter/flutter#33901

flutter/flutter#19718
2019-06-06 21:58:04 -07:00
Amir Hardon
647a8524b0
Revert "Switch PlatformViewsController from Activity ref to Application ref. (#9193)" (#9211)
This reverts commit 5ea125eaf9e15a3e4eefe89b13cb86b0ba820d8f.
2019-06-06 09:29:10 -07:00
Matt Carroll
5ea125eaf9
Switch PlatformViewsController from Activity ref to Application ref. (#9193) 2019-06-05 14:24:16 -07:00
Greg Spencer
bf15bd0803
Add the key event source, vendorId, and productId from Android (#9186)
This adds the key event source from Android so that the framework can differentiate between keyboard events and game controller events. Also added vendor and product ids so that Flutter code can decide to do special processing based on the kind of device, if desired.
2019-06-04 16:46:23 -07:00
Amir Hardon
86aa01442b
Fix platform views channel regression (#9185)
This regression was introduced in #7847.

The PlatformViewsChannel method call handler was always setting the result to `notImplemented` even after handling a result, this resulted in a "Reply already submitted" exception being thrown.
Note that the method channel code is swallowing this exception and logging an error, so we didn't crash instead we were logging an error(this is why the integration test didn't fail).

Filed https://github.com/flutter/flutter/issues/33863 to make sure tests fail when such exceptions are thrown.

This PR also cleans up an unused `NoSuchPlatformViewException` that was introduced in #7847.

https://github.com/flutter/flutter/issues/33866
2019-06-04 12:38:38 -07:00
Matt Carroll
008090b8ab
Extracted PlatformViewsChannel from PlatformViewsController. (#7847) 2019-06-03 11:04:33 -07:00
Jason Simmons
e87326dd7d
Suppress an unchecked cast warning in ShimPluginRegistry (#9145) 2019-05-30 13:10:03 -07:00
Matt Carroll
e8aa120482
New Plugin API PR5: Integrates plugin lifecycle control with FlutterFragment. (#9083) 2019-05-29 20:46:07 -07:00
Matt Carroll
8b1199c4dd
Implemented Log proxy that only logs in BuildConfig.DEBUG (#25391). (#9122) 2019-05-29 20:19:29 -07:00
Matt Carroll
4c4c0f8282
Add plugin shim to facilitate old plugins in new embedding (#33478). (#9120) 2019-05-29 18:39:15 -07:00
Matt Carroll
e8c2b17873
Added support for transparent FlutterActivitys (#32740). (#9115) 2019-05-29 18:34:53 -07:00
Chris Bracken
509a43fe27
Apply minor cleanups to Android embedding (#9088)
Eliminate an unused import, add missing @Override annotations, and
eliminate an unused logger.
2019-05-25 15:45:14 -07:00
Matt Carroll
cfa524fcdf
New Plugin API PR4: Adds Lifecycle support to the new plugin system. (#9049) 2019-05-24 19:28:49 -07:00
Matt Carroll
c181972a40
New Plugin API PR3: Introduces Service, BroadcastReceiver, and ContentProvider awareness, control surfaces, and plugin bindings. (#8962) 2019-05-17 14:25:05 -07:00
Matt Carroll
51486a5494
New Plugin API PR2: Introduces ActivityAware, ActivityControlSurface, and ActivityPluginBinding. (#8943) 2019-05-13 17:07:29 -07:00
Matt Carroll
904cfc4fe3
Add @UiThread to MethodChannel and related classes/calls (#32642). (#8947) 2019-05-13 13:26:31 -07:00
Matt Carroll
816d3fc586
New Plugin API PR1: Introduces PluginRegistry and FlutterPlugin, adds support for plugin registration to FlutterEngine. (#8826) 2019-05-12 16:58:38 -07:00
Matt Carroll
2c9e37c34e
Cause crash in FlutterJNI if invoked on non-main thread (#31263). (#8830) 2019-05-03 14:55:28 -07:00
Dan Field
7ce2666e54
Guard Android logs (#8824) 2019-05-03 14:32:29 -07:00
Matt Carroll
30639ee7b6
Allow FlutterEngine to be used on back-to-back screens (#31264). (#8808) 2019-05-02 13:19:11 -07:00