Commit Graph

14 Commits

Author SHA1 Message Date
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
Zachary Anderson 7804e8588a View destroy listener (#4347)
[Android] Allow persisting a FlutterNativeView across activities.
2017-11-13 13:56:48 -08:00
Zachary Anderson f5bdf9b0fc [Android] Pulls the native platform view out of FlutterView (#4338) 2017-11-09 12:10:00 -08:00