56 Commits

Author SHA1 Message Date
Jason Simmons
e8db5dfd52
Always run the resource extractor in FlutterMain (#9149)
FlutterMain.findAppBundlePath is using the presence of the flutter_assets
directory as a signal that the app is initialized.  For consistency,
FlutterMain will run the resource extractor at startup and create
flutter_assets even if no resources need to be extracted.
2019-05-30 16:50:31 -07:00
Kate Lovett
6e5151359d
Removing unused imports (#9108) 2019-05-28 15:16:33 -07:00
Mehmet Fidanboylu
41e10f07f4
Fix internal break since listing contents can return null (#9078) 2019-05-26 20:07:13 -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
Jason Simmons
ee6a9c4049
Fix unchecked operation warnings in FlutterMain (#9073)
Also remove trailing whitespace on some lines
2019-05-23 15:30:08 -07:00
Emmanuel Garcia
20f5000bc5
Add mode to load AOT snapshots as a native lib (#8979) 2019-05-20 10:08:50 -07:00
Dan Field
88e82d371a
Remove static leaks (#8825) 2019-05-03 16:57:04 -07:00
Stanislav Baranov
8b5f77630f
Remove support for downloading dynamic patches. (#8663) 2019-04-22 09:05:06 -07:00
Chinmay Garde
1fe3279149
Cleanup references to FLX archives from the engine. (#8653) 2019-04-19 12:49:07 -07:00
Chinmay Garde
56052c70af
Rename the shell namespace to flutter. (#8520) 2019-04-09 17:10:46 -07:00
Matt Carroll
dbcfc504cc
Android Embedding PR26: Offer an async version of FlutterMain's ensure initialization complete. (#8465) 2019-04-08 14:46:41 -07:00
Jason Simmons
9f50dae33f
Look up ICU symbols based on the path to libflutter.so as a fallback (#8139)
The ICU data is packaged within libflutter.so, and the engine uses
dlsym(RTLD_DEFAULT) to look up the ICU data symbols in the libraries
loaded by the process.

This approach apparently fails on some Xiaomi devices.  If RTLD_DEFAULT
can not find the symbols, then the platform will pass the path to the
libflutter.so library so the engine can use that to resolve the symbols.

Fixes https://github.com/flutter/flutter/issues/28208
2019-03-12 18:33:33 -07:00
Stanislav Baranov
36d495d57a
Dynamic patching support for native code libraries. (#7927) 2019-02-22 14:18:47 -08:00
Jason Simmons
050dcaad60
Embed ICU data inside libflutter.so on Android (#7588)
Prior to this the Android embedder code would extract the icudtl.dat asset out
of the APK and write it to local disk during the first startup of the app.

This change will make that work unnecessary and eliminate the risk of ICU
failures due to errors in the extraction process.
2019-01-30 11:56:17 -08:00
Stanislav Baranov
844d27cb3c
Refactor dynamic patching to use clearer naming and structure. (#7426)
This is a no-op change, except for fixing a bug where download task
reference wasn't cleared after download was completed.

This change also removes call to output stream flush(), which is not
necessary according to Java spec.

The rest of the change deals with requiring the code to work directly
with ResourceUpdater object instead of having FlutterMain be a facade
that forwards some of ResourceUpdater's methods. This simplifies the
other (more essential) upcoming changes that will be landing in the
followings few PRs.
2019-01-09 14:21:36 -08:00
Stanislav Baranov
8cca33aea8
Give more control over when dynamic patches get downloaded and installed. (#7327)
This change introduces manifest properties that control when dynamic patches are downloaded and installed in the application lifecycle.

Application developer can choose whether between install on restart, install on resume, or immediate forced install of dynamic patches.
2019-01-02 10:40:37 -08:00
Stanislav Baranov
6f763fbad7
Minor refactoring of dynamic patching code. (#7325)
Minor refactoring of dynamic patching code.

- Changes naming of manifest properties to be consistent with documentation.
- Moves methods from inner class to outer class to make them more reusable.
2018-12-28 13:23:38 -08:00
Dan Field
8b73b9d42c
Fix javadoc for Android-28 (#7254)
* Fix javadoc for Android-28

* build javadoc as part of pre-submit
2018-12-19 09:24:02 -08:00
Stanislav Baranov
18a4e33c2a
Downloading and installation of dynamic updates on Android (#7207) 2018-12-13 10:17:37 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Chinmay Garde
f2a3df97e2
Wire up the Skia persistent GPU related artifacts cache. (#6278)
Also teaches FML to create files and directories.
2018-09-26 14:54:09 -07:00
Ryan Macnak
60bb5da33c
Reapply "Some cleanups enabled by removing support for Dart 1" (#6250)
Following fixes in dart-lang/sdk@91cbb57cd5
2018-09-14 09:36:13 -07:00
Michael Goderbauer
6f459e2f10
Revert "Reapply "Some cleanups enabled by removing support for Dart 1" (#6216)" (#6232)
This reverts commit e3133e0e3f7cbbd57fa930c11f3640561d691eba.
2018-09-12 12:07:20 +02:00
Ryan Macnak
e3133e0e3f
Reapply "Some cleanups enabled by removing support for Dart 1." (#6216)
- Add missing Dart 2 flags to gen_snapshot invocation.
 - Disable brittle service test.
2018-09-10 17:03:54 -07:00
Ryan Macnak
bf96dbed38
Revert "Some cleanups enabled by removing support for Dart. (#5621)" (#6205)
This reverts commit 4c2448d1591a5fab033de3885ad34d1fdf5474f1.
2018-09-07 17:39:51 -07:00
Ryan Macnak
4c2448d159
Some cleanups enabled by removing support for Dart. (#5621)
- Switch core snapshot to Dart 2 and remove support for loading platform.dill.
 - Remove support for loading script snapshots.
 - Remove support for loading source.
 - Remove settings and fix names to reflect the above.
 - Remove support for loading the service isolate from source.
2018-09-07 15:44:46 -07:00
Jason Simmons
e6d9b34a8c
Remove the old location of the ICU data asset (#6170)
The tools are now placing icudtl.dat in the flutter_shared directory.
It is no longer necessary to check for this asset at its previous path.
2018-09-05 12:22:27 -07:00
Martin Kustermann
81baff97c2
Switch all embedders to use platform_strong.dill instead of platform.dill (the flutter_tester binary already does this) (#6024) 2018-08-15 17:45:11 +02:00
Ben Konyi
3cbb5e2067
Persist DartCallbackCache contents across launches (#5947)
* Updated DartCallbackCache to write callback cache to disk which is
restored on engine startup
* Ensure cache isn't moved off disk in iOS
2018-08-07 14:37:19 -07:00
amirh
51785d244d
Remove unused Java imports (#5663) 2018-07-03 09:21:03 -07:00
Jason Simmons
2c158b6390
Check for calls to FlutterMain.ensureInitializationComplete before startInitialization (#5614) 2018-06-25 16:32:38 -07:00
Jason Simmons
1174a4d9fe
Load the ICU data file asset from the "flutter_shared" path (#5567)
See https://github.com/flutter/flutter/issues/18514
2018-06-19 14:34:13 -07:00
Ryan Macnak
86d96fd0ce
Reapply "Don't link the core snapshot in the Android engine." (#5353)
Add back the core snapshot to runtime_unittests and embedder_unittests.
2018-05-23 17:09:51 -07:00
Ryan Macnak
2e9ff1f09a
Revert "Don't link the core snapshot in the Android engine. (#5348)" (#5352)
This reverts commit e0d4c4641386b8a81c7e9c3bc1a32172d81a785d.
2018-05-23 16:11:57 -07:00
Ryan Macnak
e0d4c46413
Don't link the core snapshot in the Android engine. (#5348)
Allows one to use a different core snapshot without a custom engine build by just packaging a different one in the APK.
2018-05-23 15:56:28 -07:00
Jason Simmons
944b7dceae
Prevent multiple calls to FlutterMain.startInitialization (#5058)
See https://github.com/flutter/flutter/issues/16748
and https://github.com/flutter/flutter/issues/16456
2018-04-20 11:38:10 -07:00
Sarah Zakarias
2c5a1bf507
Provide lookup key to access Flutter assets in the APK (#4785) 2018-03-16 12:59:57 +01:00
Sarah Zakarias
a00f8e8bc0
Read assets out of APK on Android (#4742) 2018-03-05 14:09:45 +01:00
Sarah Zakarias
00e9b362d5
Read FlutterAssetsDir from the Android manifest XML file (#4485) 2017-12-21 09:26:16 +01:00
Sarah Zakarias
4cbe26dd37
Handle Flutter assets outside FLX (#4343) 2017-12-13 10:55:24 +01:00
Martin Kustermann
5c6ebf7994
Enable flutter engine to also work with .*so files on android (#4298)
* Enable flutter engine to also work with .*so files on android

We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps.  The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.

This CL adds support for being able to load the flutter app from an *.so
file on Android.

* Add sanity check to ensure we have either shared library or instruction snapshot (but not both)
2017-11-21 13:14:50 +01:00
Alexander Aprelev
ec19da1c80 Initialize service isolate from kernel file, rather than from embedded sources. (#4263)
* Read core platform kernel file during Dart initialization.

Currently service isolate is initialized from the source code parsed by VM.
This CL changes it so service isolate created during Dart initialization
is created from the kernel platform.dill file if it is present in the application
bundle. Then this platform kernel file is kept in dart_init module and reused
for application sciprt isolates.

* Reformat and merge

* Use accessor method

* Avoid passing running_from_kernel param. Add TODO for cleanup. Rename param.
2017-10-24 19:37:24 -07:00
Sarah Zakarias
7fb41d1b6a Read snapshot directly from data dir instead of FLX (#4214) 2017-10-17 15:06:03 +02:00
Chinmay Garde
5e98732301 Remove libsky_shell.so to libflutter.so. (#3517) 2017-03-24 16:25:33 -07:00
Chinmay Garde
1c07ea530f Remove uses of //base from all //flutter projects and replace them with //fml variants. (#3492) 2017-03-22 15:42:51 -07:00
Mikkel Nygaard Ravn
c4edec7417 Remove old flutter messaging API (#3482)
Breaking change: removed facilities for JSON and string messaging from FlutterView/FlutterViewController, leaving only binary messaging there. All other use of flutter communication now goes through FlutterMessageChannel and FlutterMethodChannels. Retained use of String and JSON codecs for now.

Companion flutter PR: flutter/flutter#8837
2017-03-17 09:04:59 +01:00
Jason Simmons
2466d31edf Fix some Javadoc warnings (#3391) 2017-02-03 16:25:25 -08:00
Ryan Macnak
adef37080f Adapt to refactoring of snapshot APIs in the Dart VM. (#3354)
Adapt to refactoring of snapshot APIs in the Dart VM.
2017-01-23 12:09:59 -08:00
Jason Simmons
5f91ff02a9 An API for setting the tag for Flutter log messages on Android (#3335)
Fixes https://github.com/flutter/flutter/issues/7226
2017-01-12 15:47:18 -08:00
Adam Barth
4b8c9051e5 Remove last mojom interface (#3184)
We no longer use mojom to transport messages. We still use the Mojo EDK
to spin the event loop, however.
2016-10-28 11:46:57 -07:00