* 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
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.
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.
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
* 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
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.