summaryrefslogtreecommitdiff
path: root/tools/aapt2/LoadedApk.cpp
diff options
context:
space:
mode:
author Mohamed Heikal <mheikal@google.com> 2020-03-18 13:19:57 -0400
committer Mohamed Heikal <mheikal@google.com> 2020-03-31 14:58:01 -0400
commite0388de6bed42778b89b1ed5b61455cc47a751e8 (patch)
tree692e9187d9fc22543cfb55b16e654a5ef3cad9c6 /tools/aapt2/LoadedApk.cpp
parent90c564fb68ca71ea0d2feed44186d2d267b00161 (diff)
Enable --collapse-resource-names on bundles
This cl enables aapt2 optimize and convert to handle collapsed resource names optimization. Test: make aapt2_test Change-Id: I160d7e5bbd94580b52c00b648918e47beb4674f1
Diffstat (limited to 'tools/aapt2/LoadedApk.cpp')
-rw-r--r--tools/aapt2/LoadedApk.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/aapt2/LoadedApk.cpp b/tools/aapt2/LoadedApk.cpp
index 45719ef474cd..e930b47f2901 100644
--- a/tools/aapt2/LoadedApk.cpp
+++ b/tools/aapt2/LoadedApk.cpp
@@ -267,8 +267,14 @@ bool LoadedApk::WriteToArchive(IAaptContext* context, ResourceTable* split_table
return false;
}
} else if (format_ == ApkFormat::kProto && path == kProtoResourceTablePath) {
+ SerializeTableOptions proto_serialize_options;
+ proto_serialize_options.collapse_key_stringpool =
+ options.collapse_key_stringpool;
+ proto_serialize_options.name_collapse_exemptions =
+ options.name_collapse_exemptions;
pb::ResourceTable pb_table;
- SerializeTableToPb(*split_table, &pb_table, context->GetDiagnostics());
+ SerializeTableToPb(*split_table, &pb_table, context->GetDiagnostics(),
+ proto_serialize_options);
if (!io::CopyProtoToArchive(context,
&pb_table,
path,