Move StringPool to libandroidfw
Test: verified affected tests pass
Bug: 232940948
Change-Id: I22089893d7e5013f759c39ce190bec07fa6435db
diff --git a/tools/aapt2/link/XmlCompatVersioner.cpp b/tools/aapt2/link/XmlCompatVersioner.cpp
index 957b64c..482c227 100644
--- a/tools/aapt2/link/XmlCompatVersioner.cpp
+++ b/tools/aapt2/link/XmlCompatVersioner.cpp
@@ -22,7 +22,7 @@
namespace aapt {
-static xml::Attribute CopyAttr(const xml::Attribute& src, StringPool* out_string_pool) {
+static xml::Attribute CopyAttr(const xml::Attribute& src, android::StringPool* out_string_pool) {
CloningValueTransformer cloner(out_string_pool);
xml::Attribute dst{src.namespace_uri, src.name, src.value, src.compiled_attribute};
if (src.compiled_value != nullptr) {
@@ -34,7 +34,7 @@
// Returns false if the attribute is not copied because an existing attribute takes precedence
// (came from a rule).
static bool CopyAttribute(const xml::Attribute& src_attr, bool generated, xml::Element* dst_el,
- StringPool* out_string_pool) {
+ android::StringPool* out_string_pool) {
CloningValueTransformer cloner(out_string_pool);
xml::Attribute* dst_attr = dst_el->FindAttribute(src_attr.namespace_uri, src_attr.name);
if (dst_attr != nullptr) {
@@ -58,7 +58,7 @@
const util::Range<ApiVersion>& api_range, bool generated,
xml::Element* dst_el,
std::set<ApiVersion>* out_apis_referenced,
- StringPool* out_string_pool) {
+ android::StringPool* out_string_pool) {
if (src_attr_version <= api_range.start) {
// The API is compatible, so don't check the rule and just copy.
if (!CopyAttribute(src_attr, generated, dst_el, out_string_pool)) {
@@ -156,7 +156,7 @@
}
static inline std::unique_ptr<Item> CloneIfNotNull(const std::unique_ptr<Item>& src,
- StringPool* out_string_pool) {
+ android::StringPool* out_string_pool) {
if (src == nullptr) {
return {};
}
@@ -166,7 +166,7 @@
std::vector<DegradeResult> DegradeToManyRule::Degrade(const xml::Element& src_el,
const xml::Attribute& src_attr,
- StringPool* out_string_pool) const {
+ android::StringPool* out_string_pool) const {
std::vector<DegradeResult> result;
result.reserve(attrs_.size());
for (const ReplacementAttr& attr : attrs_) {