41 Commits

Author SHA1 Message Date
xster
915e2ca178
FlutterEngineGroup for Android (#23675) 2021-01-19 12:29:02 -08:00
Dan Field
48687ca3ca
Forbid android.util.Log (#21696) 2020-10-08 14:52:05 -07:00
xster
caa8e6dd9f
Re-land deprecate Android v1 embedding classes (#21347) 2020-09-23 11:25:20 -07:00
Zachary Anderson
c62d665299
Revert "Deprecate Android v1 embedding classes (#20868)" (#21338)
This reverts commit 3011b14a25ea5c9fd54ecffc2e154e587c4a6b1a.
2020-09-22 14:38:18 -07:00
xster
3011b14a25
Deprecate Android v1 embedding classes (#20868) 2020-09-21 15:02:02 -07:00
Emmanuel Garcia
025e2d82dd
Migrate embedding to AndroidX (#17075) 2020-03-13 21:19:24 -07:00
Michael Klimushyn
077918dcfd
Apply Google Java format (#16501)
This shouldn't result in any logical changes. I've done a quick smoke
test by building a local Android engine and running Flutter gallery, no
compile errors or other obvious issues.

Applied by running `/ci/format.sh | patch -p0` with the altered script
added in flutter/engine#16500. I did locally modify the script slightly
further so it would run against all Java files in the repo instead of
just modified ones.
2020-02-07 16:10:46 -08:00
Jason Simmons
c081ee7f2c
Use DartExecutor.getBinaryMessenger in FlutterNativeView instead of deprecated send methods (#13403) 2019-10-29 09:48:54 -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
4c6948a88a
Android Embedding Refactor 38: Removed AssetManager from DartEntrypoint. (#10250) 2019-07-30 12:57:01 -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
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
Matt Carroll
904cfc4fe3
Add @UiThread to MethodChannel and related classes/calls (#32642). (#8947) 2019-05-13 13:26:31 -07:00
Matt Carroll
d3fbaea9a4
Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (#8460) 2019-04-05 15:59:12 -07:00
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 5442c0a7da385ac5ebfe7ec66126ee593d84e2a2.
2018-08-07 12:42:22 -07:00
Alexander Markov
5442c0a7da
Revert "Updated background execution implementation for Android" (#5949)
This reverts commit bc885f319b2fdf471cf1efdf733a2f6708bd4665.
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
(6baff4c821)
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 c83d1ef12df0cf8b11a6dda044f812f8cc6c16ef.
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