Commit Graph

27 Commits

Author SHA1 Message Date
Jason Simmons 68bd4f2c64 Do not drop the DartExecutor's message handler when a FlutterNativeView is detached from the FlutterView (#8254)
An activity can use ViewFactory.retainNativeFlutterView to reuse a
FlutterNativeView across multiple instances of the activity.  In this
scenario, the FlutterNativeView should continue to handle incoming messages
sent from Dart.
2019-03-21 18:08:58 -07:00
Matt Carroll 9f95ef23aa Android Embedding PR 8: Add FlutterEngine attachment/detachment to FlutterView (#7946) 2019-02-26 01:54:17 -08:00
Jason Simmons fd6c3fc700 Do not clear FlutterJNI state when a FlutterView is detached (#7929)
If an app is using retainFlutterNativeView or a plugin wants to keep the
FlutterNativeView active, then the FlutterNativeView should not drop its
handle to the corresponding native platform view.

Fixes https://github.com/flutter/flutter/issues/26931
2019-02-25 15:31:50 -08:00
Matt Carroll 2f4a38dbd3 Android embedding refactor pr3 add remaining systemchannels (#7892)
Merging back in after reversion. Fixed some messaging issues in FlutterNativeView and corrected some message parsing.
2019-02-20 17:05:31 -08:00
Matt Carroll 211adeac3a Introduced a number of Java system channels in io/flutter/embedding/engine/systemchannels/ (#7500) 2019-02-06 17:07:30 -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 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
Dan Field 110a5f320c Reset a11y bridge state on hot restart (#6857) 2018-11-14 11:13:39 -08:00
Michael Goderbauer 70a1106b50 Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Stanislav Baranov 74373462e4 Fix codepush breakage caused by #5954. (#5996) 2018-08-10 13:23:51 -07:00
Keerti Parthasarathy 78f8bcace7 Annotate deprecated methods with @Deprecated (#5976) 2018-08-08 13:02:41 -07:00
Ben Konyi aef94b73d1 Reland "Updated background execution implementation for Android" (#5954)
* Reland "Updated background execution implementation for Android" w/ JNI fixes for merge breakages

This reverts commit 5442c0a7da.
2018-08-07 12:42:22 -07:00
Alexander Markov 5442c0a7da Revert "Updated background execution implementation for Android" (#5949)
This reverts commit bc885f319b.
2018-08-06 14:10:23 -07:00
Ben Konyi bc885f319b Updated background execution implementation for Android 2018-08-06 12:27:57 -07:00
amirh ffbafc852d Flush all embedded Android views on hot restart. (#5929)
* Flush all embedded Android view on hot restart.

Adds an OnEngineRestarted method to PlatformView, this is currently only
implemented for Android where we need to use it for embedded views.

* review comments followup

* rename to OnPreEngineRestart, call before Clone
2018-08-03 08:54:12 -07:00
amirh 68d81a31f4 Platform Views: Android and MethodChannel APIs, and implementation skeleton. (#5684)
To keep the scope of this CL as small of possible I'm leaving the actual
implementation of the platform view mechanics to a following CL.

This CL introduces:
  * A PlatformViewsController class which will be responsible for creating,
    resizing, and disposing platform views.
  * A PlatformViewRegistry which is exposed through the PluginRegistry
    and allows plugins to register factories for platform views.

Android plugin code will add support for a new platform view type by
implementing PlatformViewFactory, and registering a factory with the
registry, e.g:
```java
registrar.platformViewRegistry().registerViewFactory(
  'webview',
  new FlutterWebViewFactory()
);
```
On the Dart side, the framework will ask the engine to create new
platform views by sending a create message over the platformviews method
channel with the unique platform view type id, dimensions, and a unique
id allocated by the framework for the new platform view instance.
The platformviews method channel is also used for resizing and disposing
platform views.
2018-07-11 14:11:15 -07:00
Jonah Williams 48d6e1f891 Custom accessibility (local context) action support for iOS and Android. (#5597) 2018-07-11 10:27:50 -07:00
Jason Simmons fbb3436eaa Remove some unused code from the Android host (#5619)
These functions were made obsolete by the engine refactoring
(https://github.com/flutter/engine/commit/6baff4c821350bbcb64e7d029574b567f3801a1a)
2018-06-27 11:06:15 -07:00
Jason Simmons c7ab033f9e Support a model where the application creates a FlutterNativeView that is never destroyed (#5256)
This allows applications to start a Flutter engine instance during app startup
and keep it running throughout the app process' lifetime.

FlutterActivity subclasses can override createFlutterNativeView to provide a
preinitialized FlutterNativeView instance and override retainFlutterNativeView
to signal that the FlutterNativeView should be kept alive when the activity
is destroyed.
2018-05-15 12:05:54 -07:00
Jonah Williams 8a6e64a8ef Revert "Do not pause rendering when android activity loses focus (#4848)" (#4985)
This reverts commit c83d1ef12d.
2018-04-12 11:20:24 -07:00
Jonah Williams c83d1ef12d Do not pause rendering when android activity loses focus (#4848)
* do not pause rendering when android view loses focus
2018-04-12 11:00:31 -07:00
Sarah Zakarias a00f8e8bc0 Read assets out of APK on Android (#4742) 2018-03-05 14:09:45 +01:00
Alexander Aprelev 6bacf4522e This adds RPC call to set asset path. (#4323)
* This adds rpc call to simply set asset path.

This is needed when doing hot reload to pick up updated assets.

* Move asset_directory fetch for after view_id. Clean up return. Fix formatting.

* Add SetAssetBundlePath methods implementations for mac and ios

* Fix mac mm

* Fix formatting

* Merge and use nullptr
2018-01-04 09:48:01 -08:00
Zachary Anderson 619f452ece [Android] Extract the PluginRegistry from the FlutterActivity (#4393) 2017-11-30 11:05:55 -08:00