diff options
author | Tao Bai <michaelbai@google.com> | 2015-09-01 18:49:54 -0700 |
---|---|---|
committer | Tao Bai <michaelbai@google.com> | 2015-09-08 18:48:42 -0700 |
commit | a6d7e3fb9c9233b9ae46b702d17433854c43d6a0 (patch) | |
tree | 3b1a5c2f45dd4e56ac320d28edb61525702fb599 /tools/aapt/Command.cpp | |
parent | 81d74743107b372424fb8f7439357bdd608f8caf (diff) |
Load app resource as shared library.
- Added aapt command line flag --app-as-shared-lib to build app resources
that could be loaded as shared lib at runtime.
- Added new method AssetManager.addAssetPathAsSharedLibrary() to load an
app resource as shared library.
Bug 22487604
Change-Id: Ib9b33c35f9c2b7129f3ba205de03d4564623ea39
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r-- | tools/aapt/Command.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index d12ab3b725c8..21f47bc28ff3 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -2395,11 +2395,11 @@ int doPackage(Bundle* bundle) // Write the R.java file into the appropriate class directory // e.g. gen/com/foo/app/R.java err = writeResourceSymbols(bundle, assets, assets->getPackage(), true, - bundle->getBuildSharedLibrary()); + bundle->getBuildSharedLibrary() || bundle->getBuildAppAsSharedLibrary()); } else { const String8 customPkg(bundle->getCustomPackage()); err = writeResourceSymbols(bundle, assets, customPkg, true, - bundle->getBuildSharedLibrary()); + bundle->getBuildSharedLibrary() || bundle->getBuildAppAsSharedLibrary()); } if (err < 0) { goto bail; @@ -2414,7 +2414,7 @@ int doPackage(Bundle* bundle) while (packageString != NULL) { // Write the R.java file out with the correct package name err = writeResourceSymbols(bundle, assets, String8(packageString), true, - bundle->getBuildSharedLibrary()); + bundle->getBuildSharedLibrary() || bundle->getBuildAppAsSharedLibrary()); if (err < 0) { goto bail; } |