diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2018-08-02 16:16:45 -0700 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2018-08-14 15:42:01 -0700 |
commit | f3649d669059b924ce9eb3eb7909cbf0a2ed31a8 (patch) | |
tree | 9c484a1b455554f6939d066a4418ec4747a7cbd3 /tools/aapt2/LoadedApk.cpp | |
parent | 196a2956b2ddee915c524e5c0f511e5ce90cc7b4 (diff) |
AAPT2: Compile --zip flag
Added a --zip flag similar to --dir that allows resources to be passed
into "aapt2 compile" using a zip file.
Also refactored Compile.cpp to be easier to mock and test in the future.
Bug: 74574557
Test: aapt2_tests
Change-Id: Idb90cb97e23a219525bdead38220cbf7bc6f3cab
Diffstat (limited to 'tools/aapt2/LoadedApk.cpp')
-rw-r--r-- | tools/aapt2/LoadedApk.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/aapt2/LoadedApk.cpp b/tools/aapt2/LoadedApk.cpp index 1dd46ba813db..2d786dda8323 100644 --- a/tools/aapt2/LoadedApk.cpp +++ b/tools/aapt2/LoadedApk.cpp @@ -184,10 +184,7 @@ bool LoadedApk::WriteToArchive(IAaptContext* context, ResourceTable* split_table std::unique_ptr<io::IFileCollectionIterator> iterator = apk_->Iterator(); while (iterator->HasNext()) { io::IFile* file = iterator->Next(); - std::string path = file->GetSource().path; - // The name of the path has the format "<zip-file-name>@<path-to-file>". - path = path.substr(path.find('@') + 1); // Skip resources that are not referenced if requested. if (path.find("res/") == 0 && referenced_resources.find(path) == referenced_resources.end()) { |