Loading tools/aapt2/cmd/Convert.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,8 @@ bool ExtractResourceConfig(const std::string& path, IAaptContext* context, } std::unordered_set<ResourceName> resources_exclude_list; bool result = ParseResourceConfig(content, context, resources_exclude_list, out_options.name_collapse_exemptions); out_options.name_collapse_exemptions, out_options.path_shorten_exemptions); if (!result) { return false; } Loading tools/aapt2/cmd/Optimize.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,8 @@ bool ExtractConfig(const std::string& path, IAaptContext* context, OptimizeOptio return false; } return ParseResourceConfig(content, context, options->resources_exclude_list, options->table_flattener_options.name_collapse_exemptions); options->table_flattener_options.name_collapse_exemptions, options->table_flattener_options.path_shorten_exemptions); } bool ExtractAppDataFromManifest(OptimizeContext* context, const LoadedApk* apk, Loading tools/aapt2/cmd/Optimize.h +2 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,8 @@ class OptimizeCommand : public Command { "--resources-config-path.", &options_.table_flattener_options.collapse_key_stringpool); AddOptionalSwitch("--shorten-resource-paths", "Shortens the paths of resources inside the APK.", "Shortens the paths of resources inside the APK. Resources can be exempted using the \n" "\"no_path_shorten\" directive in a file specified by --resources-config-path.", &options_.shorten_resource_paths); // TODO(b/246489170): keep the old option and format until transform to the new one AddOptionalFlag("--resource-path-shortening-map", Loading tools/aapt2/cmd/Util.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -448,7 +448,8 @@ std::regex GetRegularExpression(const std::string &input) { bool ParseResourceConfig(const std::string& content, IAaptContext* context, std::unordered_set<ResourceName>& out_resource_exclude_list, std::set<ResourceName>& out_name_collapse_exemptions) { std::set<ResourceName>& out_name_collapse_exemptions, std::set<ResourceName>& out_path_shorten_exemptions) { for (StringPiece line : util::Tokenize(content, '\n')) { line = util::TrimWhitespace(line); if (line.empty()) { Loading Loading @@ -477,6 +478,8 @@ bool ParseResourceConfig(const std::string& content, IAaptContext* context, out_resource_exclude_list.insert(resource_name.ToResourceName()); } else if (directive == "no_collapse" || directive == "no_obfuscate") { out_name_collapse_exemptions.insert(resource_name.ToResourceName()); } else if (directive == "no_path_shorten") { out_path_shorten_exemptions.insert(resource_name.ToResourceName()); } } } Loading tools/aapt2/cmd/Util.h +2 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,8 @@ std::regex GetRegularExpression(const std::string &input); bool ParseResourceConfig(const std::string& content, IAaptContext* context, std::unordered_set<ResourceName>& out_resource_exclude_list, std::set<ResourceName>& out_name_collapse_exemptions); std::set<ResourceName>& out_name_collapse_exemptions, std::set<ResourceName>& out_path_shorten_exemptions); } // namespace aapt Loading Loading
tools/aapt2/cmd/Convert.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,8 @@ bool ExtractResourceConfig(const std::string& path, IAaptContext* context, } std::unordered_set<ResourceName> resources_exclude_list; bool result = ParseResourceConfig(content, context, resources_exclude_list, out_options.name_collapse_exemptions); out_options.name_collapse_exemptions, out_options.path_shorten_exemptions); if (!result) { return false; } Loading
tools/aapt2/cmd/Optimize.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,8 @@ bool ExtractConfig(const std::string& path, IAaptContext* context, OptimizeOptio return false; } return ParseResourceConfig(content, context, options->resources_exclude_list, options->table_flattener_options.name_collapse_exemptions); options->table_flattener_options.name_collapse_exemptions, options->table_flattener_options.path_shorten_exemptions); } bool ExtractAppDataFromManifest(OptimizeContext* context, const LoadedApk* apk, Loading
tools/aapt2/cmd/Optimize.h +2 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,8 @@ class OptimizeCommand : public Command { "--resources-config-path.", &options_.table_flattener_options.collapse_key_stringpool); AddOptionalSwitch("--shorten-resource-paths", "Shortens the paths of resources inside the APK.", "Shortens the paths of resources inside the APK. Resources can be exempted using the \n" "\"no_path_shorten\" directive in a file specified by --resources-config-path.", &options_.shorten_resource_paths); // TODO(b/246489170): keep the old option and format until transform to the new one AddOptionalFlag("--resource-path-shortening-map", Loading
tools/aapt2/cmd/Util.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -448,7 +448,8 @@ std::regex GetRegularExpression(const std::string &input) { bool ParseResourceConfig(const std::string& content, IAaptContext* context, std::unordered_set<ResourceName>& out_resource_exclude_list, std::set<ResourceName>& out_name_collapse_exemptions) { std::set<ResourceName>& out_name_collapse_exemptions, std::set<ResourceName>& out_path_shorten_exemptions) { for (StringPiece line : util::Tokenize(content, '\n')) { line = util::TrimWhitespace(line); if (line.empty()) { Loading Loading @@ -477,6 +478,8 @@ bool ParseResourceConfig(const std::string& content, IAaptContext* context, out_resource_exclude_list.insert(resource_name.ToResourceName()); } else if (directive == "no_collapse" || directive == "no_obfuscate") { out_name_collapse_exemptions.insert(resource_name.ToResourceName()); } else if (directive == "no_path_shorten") { out_path_shorten_exemptions.insert(resource_name.ToResourceName()); } } } Loading
tools/aapt2/cmd/Util.h +2 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,8 @@ std::regex GetRegularExpression(const std::string &input); bool ParseResourceConfig(const std::string& content, IAaptContext* context, std::unordered_set<ResourceName>& out_resource_exclude_list, std::set<ResourceName>& out_name_collapse_exemptions); std::set<ResourceName>& out_name_collapse_exemptions, std::set<ResourceName>& out_path_shorten_exemptions); } // namespace aapt Loading