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/Main.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/Main.cpp')
-rw-r--r-- | tools/aapt/Main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index bcf0d5e53c07..64112867a4b4 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -200,6 +200,9 @@ void usage(void) " --shared-lib\n" " Make a shared library resource package that can be loaded by an application\n" " at runtime to access the libraries resources. Implies --non-constant-id.\n" + " --app-as-shared-lib\n" + " Make an app resource package that also can be loaded as shared library at runtime.\n" + " Implies --non-constant-id.\n" " --error-on-failed-insert\n" " Forces aapt to return an error if it fails to insert values into the manifest\n" " with --debug-mode, --min-sdk-version, --target-sdk-version --version-code\n" @@ -668,6 +671,9 @@ int main(int argc, char* const argv[]) } else if (strcmp(cp, "-shared-lib") == 0) { bundle.setNonConstantId(true); bundle.setBuildSharedLibrary(true); + } else if (strcmp(cp, "-app-as-shared-lib") == 0) { + bundle.setNonConstantId(true); + bundle.setBuildAppAsSharedLibrary(true); } else if (strcmp(cp, "-no-crunch") == 0) { bundle.setUseCrunchCache(true); } else if (strcmp(cp, "-ignore-assets") == 0) { |