Move StringPool to libandroidfw

Test: verified affected tests pass
Bug: 232940948
Change-Id: I22089893d7e5013f759c39ce190bec07fa6435db
diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h
index 548f5f9..396ce97 100644
--- a/tools/aapt2/ResourceParser.h
+++ b/tools/aapt2/ResourceParser.h
@@ -20,14 +20,13 @@
 #include <memory>
 #include <optional>
 
-#include "android-base/macros.h"
-#include "androidfw/ConfigDescription.h"
-#include "androidfw/StringPiece.h"
-
-#include "Diagnostics.h"
 #include "ResourceTable.h"
 #include "ResourceValues.h"
-#include "StringPool.h"
+#include "android-base/macros.h"
+#include "androidfw/ConfigDescription.h"
+#include "androidfw/IDiagnostics.h"
+#include "androidfw/StringPiece.h"
+#include "androidfw/StringPool.h"
 #include "xml/XmlPullParser.h"
 
 namespace aapt {
@@ -59,10 +58,10 @@
 
 struct FlattenedXmlSubTree {
   std::string raw_value;
-  StyleString style_string;
+  android::StyleString style_string;
   std::vector<UntranslatableSection> untranslatable_sections;
   xml::IPackageDeclStack* namespace_resolver;
-  Source source;
+  android::Source source;
 };
 
 /*
@@ -70,7 +69,7 @@
  */
 class ResourceParser {
  public:
-  ResourceParser(IDiagnostics* diag, ResourceTable* table, const Source& source,
+  ResourceParser(android::IDiagnostics* diag, ResourceTable* table, const android::Source& source,
                  const android::ConfigDescription& config,
                  const ResourceParserOptions& options = {});
   bool Parse(xml::XmlPullParser* parser);
@@ -78,7 +77,7 @@
   static std::unique_ptr<Item> ParseXml(const FlattenedXmlSubTree& xmlsub_tree, uint32_t type_mask,
                                         bool allow_raw_value, ResourceTable& table,
                                         const android::ConfigDescription& config,
-                                        IDiagnostics& diag);
+                                        android::IDiagnostics& diag);
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ResourceParser);
@@ -93,7 +92,7 @@
   // `out_untranslatable_sections` contains the sections of the string that should not be
   // translated.
   bool FlattenXmlSubtree(xml::XmlPullParser* parser, std::string* out_raw_string,
-                         StyleString* out_style_string,
+                         android::StyleString* out_style_string,
                          std::vector<UntranslatableSection>* out_untranslatable_sections);
 
   /*
@@ -133,9 +132,9 @@
   bool ParseArrayImpl(xml::XmlPullParser* parser, ParsedResource* out_resource, uint32_t typeMask);
   bool ParsePlural(xml::XmlPullParser* parser, ParsedResource* out_resource);
 
-  IDiagnostics* diag_;
+  android::IDiagnostics* diag_;
   ResourceTable* table_;
-  Source source_;
+  android::Source source_;
   android::ConfigDescription config_;
   ResourceParserOptions options_;
 };