Commit Graph

68 Commits

Author SHA1 Message Date
Mehmet Fidanboylu 4092b0c4fe Add isRunningInRobolectricTest back (#13424) 2019-10-29 19:46:21 -07:00
Matt Carroll 9acec4102a Move initialization into FlutterEngine (#12806) 2019-10-11 16:15:55 -07:00
Jonah Williams 6f5eb1332f Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
Matt Carroll 4c6948a88a Android Embedding Refactor 38: Removed AssetManager from DartEntrypoint. (#10250) 2019-07-30 12:57:01 -07:00
Matt Carroll f336e05a69 Android Embedding PR37: Separated FlutterActivity and FlutterFragment via FlutterActivityAndFragmentDelegate (#9895) 2019-07-29 17:40:25 -07:00
Jason Simmons 3c9a22c778 Fall back to a fully qualified path to libapp.so if the library can not be loaded by name (#9762)
libapp.so contains compiled application Dart code.  On most Android systems,
this library can be loaded by calling dlopen("libapp.so"), which will search
Android's default library directories.

On some Android devices this does not work as expected.  As a workaround, this
patch provides a fallback path to libapp.so based on ApplicationInfo.nativeLibraryDir.

Fixes https://github.com/flutter/flutter/issues/35838
2019-07-11 12:39:42 -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
Matt Carroll a2db2ea6f1 Android Embedding Refactor PR35: Ensure all JNI methods are in FlutterJNI (#34751). (#9391) 2019-06-20 17:13:58 -07:00
Jason Simmons 209250da1b When running in AOT modes create a flutter_assets directory that can be used as the bundle path (#9306)
The engine RunBundleAndSnapshotFromLibrary API expects a bundle path directory
containing the application's assets.  If the Android embedding is using
AOT ELF library packaging and does not need to extract assets, then create an
empty directory at the bundle path.

Fixes https://github.com/flutter/flutter/issues/34287
2019-06-12 17:34:02 -07:00
Jason Simmons 4d6847466d Load AOT compiled Dart assets only from ELF libraries (#9260)
Previously AOT compiled Dart code would be packaged as a group of assets
within the APK.  This has been replaced by a single ELF library containing
the same data.
2019-06-11 10:10:45 -07:00
Emmanuel Garcia 05365c4c32 Revert change by mistake: extract resources (#9180) 2019-06-03 23:44:46 -07:00
Emmanuel Garcia f4d92c1f0c Use shared library when libapp.so is found (#9172) 2019-06-03 16:23:28 -07:00
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