Loading tools/aapt2/ResourceParser.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -342,7 +342,7 @@ bool ResourceParser::FlattenXmlSubtree( } } // Sanity check to make sure we processed all the nodes. // Validity check to make sure we processed all the nodes. CHECK(node_stack.size() == 1u); CHECK(node_stack.back() == &root); Loading tools/aapt2/ResourceUtils.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -740,7 +740,7 @@ std::unique_ptr<Item> ParseBinaryResValue(const ResourceType& type, const Config if (type == ResourceType::kId) { if (res_value.dataType != android::Res_value::TYPE_REFERENCE && res_value.dataType != android::Res_value::TYPE_DYNAMIC_REFERENCE) { // plain "id" resources are actually encoded as dummy values (aapt1 uses an empty string, // plain "id" resources are actually encoded as unused values (aapt1 uses an empty string, // while aapt2 uses a false boolean). return util::make_unique<Id>(); } Loading tools/aapt2/cmd/Link.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1401,7 +1401,7 @@ class Linker { return MergeExportedSymbols(compiled_file.source, compiled_file.exported_symbols); } // Takes a path to load as a ZIP file and merges the files within into the master ResourceTable. // Takes a path to load as a ZIP file and merges the files within into the main ResourceTable. // If override is true, conflicting resources are allowed to override each other, in order of last // seen. // An io::IFileCollection is created from the ZIP file and added to the set of Loading Loading @@ -1432,7 +1432,7 @@ class Linker { return !error; } // Takes a path to load and merge into the master ResourceTable. If override is true, // Takes a path to load and merge into the main ResourceTable. If override is true, // conflicting resources are allowed to override each other, in order of last seen. // If the file path ends with .flata, .jar, .jack, or .zip the file is treated // as ZIP archive and the files within are merged individually. Loading @@ -1449,7 +1449,7 @@ class Linker { return MergeFile(file, override); } // Takes an AAPT Container file (.apc/.flat) to load and merge into the master ResourceTable. // Takes an AAPT Container file (.apc/.flat) to load and merge into the main ResourceTable. // If override is true, conflicting resources are allowed to override each other, in order of last // seen. // All other file types are ignored. This is because these files could be coming from a zip, Loading tools/aapt2/cmd/Optimize.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -132,8 +132,8 @@ class Optimizer { if (context_->IsVerbose()) { context_->GetDiagnostics()->Note(DiagMessage() << "Optimizing APK..."); } if (!options_.resources_blacklist.empty()) { ResourceFilter filter(options_.resources_blacklist); if (!options_.resources_exclude_list.empty()) { ResourceFilter filter(options_.resources_exclude_list); if (!filter.Consume(context_, apk->GetResourceTable())) { context_->GetDiagnostics()->Error(DiagMessage() << "failed filtering resources"); return 1; Loading Loading @@ -328,7 +328,7 @@ bool ParseConfig(const std::string& content, IAaptContext* context, OptimizeOpti } for (StringPiece directive : util::Tokenize(directives, ',')) { if (directive == "remove") { options->resources_blacklist.insert(resource_name.ToResourceName()); options->resources_exclude_list.insert(resource_name.ToResourceName()); } else if (directive == "no_collapse" || directive == "no_obfuscate") { options->table_flattener_options.name_collapse_exemptions.insert( resource_name.ToResourceName()); Loading tools/aapt2/cmd/Optimize.h +2 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,8 @@ struct OptimizeOptions { // Details of the app extracted from the AndroidManifest.xml AppInfo app_info; // Blacklist of unused resources that should be removed from the apk. std::unordered_set<ResourceName> resources_blacklist; // Exclude list of unused resources that should be removed from the apk. std::unordered_set<ResourceName> resources_exclude_list; // Split APK options. TableSplitterOptions table_splitter_options; Loading Loading
tools/aapt2/ResourceParser.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -342,7 +342,7 @@ bool ResourceParser::FlattenXmlSubtree( } } // Sanity check to make sure we processed all the nodes. // Validity check to make sure we processed all the nodes. CHECK(node_stack.size() == 1u); CHECK(node_stack.back() == &root); Loading
tools/aapt2/ResourceUtils.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -740,7 +740,7 @@ std::unique_ptr<Item> ParseBinaryResValue(const ResourceType& type, const Config if (type == ResourceType::kId) { if (res_value.dataType != android::Res_value::TYPE_REFERENCE && res_value.dataType != android::Res_value::TYPE_DYNAMIC_REFERENCE) { // plain "id" resources are actually encoded as dummy values (aapt1 uses an empty string, // plain "id" resources are actually encoded as unused values (aapt1 uses an empty string, // while aapt2 uses a false boolean). return util::make_unique<Id>(); } Loading
tools/aapt2/cmd/Link.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1401,7 +1401,7 @@ class Linker { return MergeExportedSymbols(compiled_file.source, compiled_file.exported_symbols); } // Takes a path to load as a ZIP file and merges the files within into the master ResourceTable. // Takes a path to load as a ZIP file and merges the files within into the main ResourceTable. // If override is true, conflicting resources are allowed to override each other, in order of last // seen. // An io::IFileCollection is created from the ZIP file and added to the set of Loading Loading @@ -1432,7 +1432,7 @@ class Linker { return !error; } // Takes a path to load and merge into the master ResourceTable. If override is true, // Takes a path to load and merge into the main ResourceTable. If override is true, // conflicting resources are allowed to override each other, in order of last seen. // If the file path ends with .flata, .jar, .jack, or .zip the file is treated // as ZIP archive and the files within are merged individually. Loading @@ -1449,7 +1449,7 @@ class Linker { return MergeFile(file, override); } // Takes an AAPT Container file (.apc/.flat) to load and merge into the master ResourceTable. // Takes an AAPT Container file (.apc/.flat) to load and merge into the main ResourceTable. // If override is true, conflicting resources are allowed to override each other, in order of last // seen. // All other file types are ignored. This is because these files could be coming from a zip, Loading
tools/aapt2/cmd/Optimize.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -132,8 +132,8 @@ class Optimizer { if (context_->IsVerbose()) { context_->GetDiagnostics()->Note(DiagMessage() << "Optimizing APK..."); } if (!options_.resources_blacklist.empty()) { ResourceFilter filter(options_.resources_blacklist); if (!options_.resources_exclude_list.empty()) { ResourceFilter filter(options_.resources_exclude_list); if (!filter.Consume(context_, apk->GetResourceTable())) { context_->GetDiagnostics()->Error(DiagMessage() << "failed filtering resources"); return 1; Loading Loading @@ -328,7 +328,7 @@ bool ParseConfig(const std::string& content, IAaptContext* context, OptimizeOpti } for (StringPiece directive : util::Tokenize(directives, ',')) { if (directive == "remove") { options->resources_blacklist.insert(resource_name.ToResourceName()); options->resources_exclude_list.insert(resource_name.ToResourceName()); } else if (directive == "no_collapse" || directive == "no_obfuscate") { options->table_flattener_options.name_collapse_exemptions.insert( resource_name.ToResourceName()); Loading
tools/aapt2/cmd/Optimize.h +2 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,8 @@ struct OptimizeOptions { // Details of the app extracted from the AndroidManifest.xml AppInfo app_info; // Blacklist of unused resources that should be removed from the apk. std::unordered_set<ResourceName> resources_blacklist; // Exclude list of unused resources that should be removed from the apk. std::unordered_set<ResourceName> resources_exclude_list; // Split APK options. TableSplitterOptions table_splitter_options; Loading