diff options
author | Chris Warrington <cmw@google.com> | 2018-02-06 14:03:39 +0000 |
---|---|---|
committer | Chris Warrington <cmw@google.com> | 2018-03-14 15:05:39 +0000 |
commit | 481f027ddc3e0ff0e1838a9375c1286e8ad70d70 (patch) | |
tree | 7df70b9bb3a5f42917ee8ea9bfa7bee8e6616ad2 /tools/aapt2/optimize | |
parent | f1a183b0a0e027abc4d0dc8286392c0620ccbe73 (diff) |
AAPT2: Automatic Static Library Namespacing.
Introduces a link flag --auto-namespace-static-lib for use when linking
static libraries.
When linking a static library with compiled sources that have references
to resources in provided libraries without an explicit package name,
the flag enables automatic inference of the package.
If a resource is present in the package that is being compiled, that is
used, otherwise the reference is rewritten to the highest precedence
resource with matching name and type.
Test: m out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests && \
$ANDROID_HOST_OUT/nativetest64/aapt2_tests/aapt2_tests
Test: m frameworks/base/tools/aapt2/integration-tests
Change-Id: I6c6017e054654d1f60782d0a428a7a2a47f8952b
Diffstat (limited to 'tools/aapt2/optimize')
-rw-r--r-- | tools/aapt2/optimize/MultiApkGenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/aapt2/optimize/MultiApkGenerator.cpp b/tools/aapt2/optimize/MultiApkGenerator.cpp index 588b3316e6fa..9cfd7300df3d 100644 --- a/tools/aapt2/optimize/MultiApkGenerator.cpp +++ b/tools/aapt2/optimize/MultiApkGenerator.cpp @@ -98,6 +98,10 @@ class ContextWrapper : public IAaptContext { util::make_unique<SourcePathDiagnostics>(Source{source}, context_->GetDiagnostics()); } + bool IsAutoNamespace() override { + return context_->IsAutoNamespace(); + } + private: IAaptContext* context_; std::unique_ptr<SourcePathDiagnostics> source_diag_; |