diff --git a/tools/aapt2/link/Linkers.h b/tools/aapt2/link/Linkers.h
index be6c930..44cd276 100644
--- a/tools/aapt2/link/Linkers.h
+++ b/tools/aapt2/link/Linkers.h
@@ -101,9 +101,10 @@
   explicit ProductFilter(std::unordered_set<std::string> products) : products_(products) {
   }
 
-  ResourceConfigValueIter SelectProductToKeep(
-      const ResourceNameRef& name, const ResourceConfigValueIter begin,
-      const ResourceConfigValueIter end, IDiagnostics* diag);
+  ResourceConfigValueIter SelectProductToKeep(const ResourceNameRef& name,
+                                              const ResourceConfigValueIter begin,
+                                              const ResourceConfigValueIter end,
+                                              android::IDiagnostics* diag);
 
   bool Consume(IAaptContext* context, ResourceTable* table) override;
 
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index d432341..cbf920ac 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -30,16 +30,16 @@
 
 namespace aapt {
 
-static bool RequiredNameIsNotEmpty(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool RequiredNameIsNotEmpty(xml::Element* el, android::SourcePathDiagnostics* diag) {
   xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name");
   if (attr == nullptr) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "<" << el->name << "> is missing attribute 'android:name'");
     return false;
   }
 
   if (attr->value.empty()) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "attribute 'android:name' in <" << el->name << "> tag must not be empty");
     return false;
   }
@@ -48,7 +48,7 @@
 
 // This is how PackageManager builds class names from AndroidManifest.xml entries.
 static bool NameIsJavaClassName(xml::Element* el, xml::Attribute* attr,
-                                SourcePathDiagnostics* diag) {
+                                android::SourcePathDiagnostics* diag) {
   // We allow unqualified class names (ie: .HelloActivity)
   // Since we don't know the package name, we can just make a fake one here and
   // the test will be identical as long as the real package name is valid too.
@@ -60,51 +60,50 @@
                                          : attr->value;
 
   if (!util::IsJavaClassName(qualified_class_name)) {
-    diag->Error(DiagMessage(el->line_number)
-                << "attribute 'android:name' in <" << el->name
-                << "> tag must be a valid Java class name");
+    diag->Error(android::DiagMessage(el->line_number) << "attribute 'android:name' in <" << el->name
+                                                      << "> tag must be a valid Java class name");
     return false;
   }
   return true;
 }
 
-static bool OptionalNameIsJavaClassName(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool OptionalNameIsJavaClassName(xml::Element* el, android::SourcePathDiagnostics* diag) {
   if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name")) {
     return NameIsJavaClassName(el, attr, diag);
   }
   return true;
 }
 
-static bool RequiredNameIsJavaClassName(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool RequiredNameIsJavaClassName(xml::Element* el, android::SourcePathDiagnostics* diag) {
   xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name");
   if (attr == nullptr) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "<" << el->name << "> is missing attribute 'android:name'");
     return false;
   }
   return NameIsJavaClassName(el, attr, diag);
 }
 
-static bool RequiredNameIsJavaPackage(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool RequiredNameIsJavaPackage(xml::Element* el, android::SourcePathDiagnostics* diag) {
   xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name");
   if (attr == nullptr) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "<" << el->name << "> is missing attribute 'android:name'");
     return false;
   }
 
   if (!util::IsJavaPackageName(attr->value)) {
-    diag->Error(DiagMessage(el->line_number) << "attribute 'android:name' in <" << el->name
-                                             << "> tag must be a valid Java package name");
+    diag->Error(android::DiagMessage(el->line_number) << "attribute 'android:name' in <" << el->name
+                                                      << "> tag must be a valid Java package name");
     return false;
   }
   return true;
 }
 
 static xml::XmlNodeAction::ActionFuncWithDiag RequiredAndroidAttribute(const std::string& attr) {
-  return [=](xml::Element* el, SourcePathDiagnostics* diag) -> bool {
+  return [=](xml::Element* el, android::SourcePathDiagnostics* diag) -> bool {
     if (el->FindAttribute(xml::kSchemaAndroid, attr) == nullptr) {
-      diag->Error(DiagMessage(el->line_number)
+      diag->Error(android::DiagMessage(el->line_number)
                   << "<" << el->name << "> is missing required attribute 'android:" << attr << "'");
       return false;
     }
@@ -114,17 +113,17 @@
 
 static xml::XmlNodeAction::ActionFuncWithDiag RequiredOneAndroidAttribute(
     const std::string& attrName1, const std::string& attrName2) {
-  return [=](xml::Element* el, SourcePathDiagnostics* diag) -> bool {
+  return [=](xml::Element* el, android::SourcePathDiagnostics* diag) -> bool {
     xml::Attribute* attr1 = el->FindAttribute(xml::kSchemaAndroid, attrName1);
     xml::Attribute* attr2 = el->FindAttribute(xml::kSchemaAndroid, attrName2);
     if (attr1 == nullptr && attr2 == nullptr) {
-      diag->Error(DiagMessage(el->line_number)
+      diag->Error(android::DiagMessage(el->line_number)
                   << "<" << el->name << "> is missing required attribute 'android:" << attrName1
                   << "' or 'android:" << attrName2 << "'");
       return false;
     }
     if (attr1 != nullptr && attr2 != nullptr) {
-      diag->Error(DiagMessage(el->line_number)
+      diag->Error(android::DiagMessage(el->line_number)
                   << "<" << el->name << "> can only specify one of attribute 'android:" << attrName1
                   << "' or 'android:" << attrName2 << "'");
       return false;
@@ -133,7 +132,7 @@
   };
 }
 
-static bool AutoGenerateIsFeatureSplit(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool AutoGenerateIsFeatureSplit(xml::Element* el, android::SourcePathDiagnostics* diag) {
   constexpr const char* kFeatureSplit = "featureSplit";
   constexpr const char* kIsFeatureSplit = "isFeatureSplit";
 
@@ -149,7 +148,7 @@
       if (!ResourceUtils::ParseBool(attr->value).value_or(false)) {
         // The isFeatureSplit attribute is false, which conflicts with the use
         // of "featureSplit".
-        diag->Error(DiagMessage(el->line_number)
+        diag->Error(android::DiagMessage(el->line_number)
                     << "attribute 'featureSplit' used in <manifest> but 'android:isFeatureSplit' "
                        "is not 'true'");
         return false;
@@ -163,7 +162,7 @@
   return true;
 }
 
-static bool AutoGenerateIsSplitRequired(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool AutoGenerateIsSplitRequired(xml::Element* el, android::SourcePathDiagnostics* diag) {
   constexpr const char* kRequiredSplitTypes = "requiredSplitTypes";
   constexpr const char* kIsSplitRequired = "isSplitRequired";
 
@@ -175,7 +174,7 @@
       if (!ResourceUtils::ParseBool(attr->value).value_or(false)) {
         // The isFeatureSplit attribute is false, which conflicts with the use
         // of "featureSplit".
-        diag->Error(DiagMessage(el->line_number)
+        diag->Error(android::DiagMessage(el->line_number)
                     << "attribute 'requiredSplitTypes' used in <manifest> but "
                        "'android:isSplitRequired' is not 'true'");
         return false;
@@ -189,18 +188,18 @@
 }
 
 static bool VerifyManifest(xml::Element* el, xml::XmlActionExecutorPolicy policy,
-                           SourcePathDiagnostics* diag) {
+                           android::SourcePathDiagnostics* diag) {
   xml::Attribute* attr = el->FindAttribute({}, "package");
   if (!attr) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "<manifest> tag is missing 'package' attribute");
     return false;
   } else if (ResourceUtils::IsReference(attr->value)) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "attribute 'package' in <manifest> tag must not be a reference");
     return false;
   } else if (!util::IsAndroidPackageName(attr->value)) {
-    DiagMessage error_msg(el->line_number);
+    android::DiagMessage error_msg(el->line_number);
     error_msg << "attribute 'package' in <manifest> tag is not a valid Android package name: '"
               << attr->value << "'";
     if (policy == xml::XmlActionExecutorPolicy::kAllowListWarning) {
@@ -215,8 +214,9 @@
   attr = el->FindAttribute({}, "split");
   if (attr) {
     if (!util::IsJavaPackageName(attr->value)) {
-      diag->Error(DiagMessage(el->line_number) << "attribute 'split' in <manifest> tag is not a "
-                                                  "valid split name");
+      diag->Error(android::DiagMessage(el->line_number)
+                  << "attribute 'split' in <manifest> tag is not a "
+                     "valid split name");
       return false;
     }
   }
@@ -225,11 +225,11 @@
 
 // The coreApp attribute in <manifest> is not a regular AAPT attribute, so type
 // checking on it is manual.
-static bool FixCoreAppAttribute(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool FixCoreAppAttribute(xml::Element* el, android::SourcePathDiagnostics* diag) {
   if (xml::Attribute* attr = el->FindAttribute("", "coreApp")) {
     std::unique_ptr<BinaryPrimitive> result = ResourceUtils::TryParseBool(attr->value);
     if (!result) {
-      diag->Error(DiagMessage(el->line_number) << "attribute coreApp must be a boolean");
+      diag->Error(android::DiagMessage(el->line_number) << "attribute coreApp must be a boolean");
       return false;
     }
     attr->compiled_value = std::move(result);
@@ -238,11 +238,11 @@
 }
 
 // Checks that <uses-feature> has android:glEsVersion or android:name, not both (or neither).
-static bool VerifyUsesFeature(xml::Element* el, SourcePathDiagnostics* diag) {
+static bool VerifyUsesFeature(xml::Element* el, android::SourcePathDiagnostics* diag) {
   bool has_name = false;
   if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name")) {
     if (attr->value.empty()) {
-      diag->Error(DiagMessage(el->line_number)
+      diag->Error(android::DiagMessage(el->line_number)
                   << "android:name in <uses-feature> must not be empty");
       return false;
     }
@@ -252,7 +252,7 @@
   bool has_gl_es_version = false;
   if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
     if (has_name) {
-      diag->Error(DiagMessage(el->line_number)
+      diag->Error(android::DiagMessage(el->line_number)
                   << "cannot define both android:name and android:glEsVersion in <uses-feature>");
       return false;
     }
@@ -260,7 +260,7 @@
   }
 
   if (!has_name && !has_gl_es_version) {
-    diag->Error(DiagMessage(el->line_number)
+    diag->Error(android::DiagMessage(el->line_number)
                 << "<uses-feature> must have either android:name or android:glEsVersion attribute");
     return false;
   }
@@ -294,34 +294,29 @@
   }
 }
 
-bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor,
-                               IDiagnostics* diag) {
+bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagnostics* diag) {
   // First verify some options.
   if (options_.rename_manifest_package) {
     if (!util::IsJavaPackageName(options_.rename_manifest_package.value())) {
-      diag->Error(DiagMessage() << "invalid manifest package override '"
-                                << options_.rename_manifest_package.value()
-                                << "'");
+      diag->Error(android::DiagMessage() << "invalid manifest package override '"
+                                         << options_.rename_manifest_package.value() << "'");
       return false;
     }
   }
 
   if (options_.rename_instrumentation_target_package) {
     if (!util::IsJavaPackageName(options_.rename_instrumentation_target_package.value())) {
-      diag->Error(DiagMessage()
+      diag->Error(android::DiagMessage()
                   << "invalid instrumentation target package override '"
-                  << options_.rename_instrumentation_target_package.value()
-                  << "'");
+                  << options_.rename_instrumentation_target_package.value() << "'");
       return false;
     }
   }
 
   if (options_.rename_overlay_target_package) {
     if (!util::IsJavaPackageName(options_.rename_overlay_target_package.value())) {
-      diag->Error(DiagMessage()
-                  << "invalid overlay target package override '"
-                  << options_.rename_overlay_target_package.value()
-                  << "'");
+      diag->Error(android::DiagMessage() << "invalid overlay target package override '"
+                                         << options_.rename_overlay_target_package.value() << "'");
       return false;
     }
   }
@@ -614,7 +609,7 @@
   TRACE_CALL();
   xml::Element* root = xml::FindRootElement(doc->root.get());
   if (!root || !root->namespace_uri.empty() || root->name != "manifest") {
-    context->GetDiagnostics()->Error(DiagMessage(doc->file.source)
+    context->GetDiagnostics()->Error(android::DiagMessage(doc->file.source)
                                      << "root tag must be <manifest>");
     return false;
   }
diff --git a/tools/aapt2/link/ManifestFixer.h b/tools/aapt2/link/ManifestFixer.h
index d5d1d17..5b04cad 100644
--- a/tools/aapt2/link/ManifestFixer.h
+++ b/tools/aapt2/link/ManifestFixer.h
@@ -96,7 +96,7 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(ManifestFixer);
 
-  bool BuildRules(xml::XmlActionExecutor* executor, IDiagnostics* diag);
+  bool BuildRules(xml::XmlActionExecutor* executor, android::IDiagnostics* diag);
 
   ManifestFixerOptions options_;
 };
diff --git a/tools/aapt2/link/NoDefaultResourceRemover.cpp b/tools/aapt2/link/NoDefaultResourceRemover.cpp
index ab3c04e..2a5163f 100644
--- a/tools/aapt2/link/NoDefaultResourceRemover.cpp
+++ b/tools/aapt2/link/NoDefaultResourceRemover.cpp
@@ -77,14 +77,14 @@
 
       for (auto iter = remove_iter; iter != end_iter; ++iter) {
         const ResourceName name(pkg->name, type->named_type, (*iter)->name);
-        IDiagnostics* diag = context->GetDiagnostics();
-        diag->Warn(DiagMessage() << "removing resource " << name
-                                 << " without required default value");
+        android::IDiagnostics* diag = context->GetDiagnostics();
+        diag->Warn(android::DiagMessage()
+                   << "removing resource " << name << " without required default value");
         if (context->IsVerbose()) {
-          diag->Note(DiagMessage() << "  did you forget to remove all definitions?");
+          diag->Note(android::DiagMessage() << "  did you forget to remove all definitions?");
           for (const auto& config_value : (*iter)->values) {
             if (config_value->value != nullptr) {
-              diag->Note(DiagMessage(config_value->value->GetSource()) << "defined here");
+              diag->Note(android::DiagMessage(config_value->value->GetSource()) << "defined here");
             }
           }
         }
diff --git a/tools/aapt2/link/ProductFilter.cpp b/tools/aapt2/link/ProductFilter.cpp
index 0c54a73..9544986 100644
--- a/tools/aapt2/link/ProductFilter.cpp
+++ b/tools/aapt2/link/ProductFilter.cpp
@@ -23,7 +23,7 @@
 
 ProductFilter::ResourceConfigValueIter ProductFilter::SelectProductToKeep(
     const ResourceNameRef& name, const ResourceConfigValueIter begin,
-    const ResourceConfigValueIter end, IDiagnostics* diag) {
+    const ResourceConfigValueIter end, android::IDiagnostics* diag) {
   ResourceConfigValueIter default_product_iter = end;
   ResourceConfigValueIter selected_product_iter = end;
 
@@ -32,16 +32,15 @@
     if (products_.find(config_value->product) != products_.end()) {
       if (selected_product_iter != end) {
         // We have two possible values for this product!
-        diag->Error(DiagMessage(config_value->value->GetSource())
-                    << "selection of product '" << config_value->product
-                    << "' for resource " << name << " is ambiguous");
+        diag->Error(android::DiagMessage(config_value->value->GetSource())
+                    << "selection of product '" << config_value->product << "' for resource "
+                    << name << " is ambiguous");
 
         ResourceConfigValue* previously_selected_config_value =
             selected_product_iter->get();
-        diag->Note(
-            DiagMessage(previously_selected_config_value->value->GetSource())
-            << "product '" << previously_selected_config_value->product
-            << "' is also a candidate");
+        diag->Note(android::DiagMessage(previously_selected_config_value->value->GetSource())
+                   << "product '" << previously_selected_config_value->product
+                   << "' is also a candidate");
         return end;
       }
 
@@ -52,15 +51,13 @@
     if (config_value->product.empty() || config_value->product == "default") {
       if (default_product_iter != end) {
         // We have two possible default values.
-        diag->Error(DiagMessage(config_value->value->GetSource())
-                    << "multiple default products defined for resource "
-                    << name);
+        diag->Error(android::DiagMessage(config_value->value->GetSource())
+                    << "multiple default products defined for resource " << name);
 
         ResourceConfigValue* previously_default_config_value =
             default_product_iter->get();
-        diag->Note(
-            DiagMessage(previously_default_config_value->value->GetSource())
-            << "default product also defined here");
+        diag->Note(android::DiagMessage(previously_default_config_value->value->GetSource())
+                   << "default product also defined here");
         return end;
       }
 
@@ -70,8 +67,7 @@
   }
 
   if (default_product_iter == end) {
-    diag->Error(DiagMessage() << "no default product defined for resource "
-                              << name);
+    diag->Error(android::DiagMessage() << "no default product defined for resource " << name);
     return end;
   }
 
diff --git a/tools/aapt2/link/ProductFilter_test.cpp b/tools/aapt2/link/ProductFilter_test.cpp
index 4f78bbc..2cb9afa 100644
--- a/tools/aapt2/link/ProductFilter_test.cpp
+++ b/tools/aapt2/link/ProductFilter_test.cpp
@@ -31,27 +31,29 @@
   ResourceTable table;
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("land/default.xml")).Build(), land)
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("land/default.xml")).Build(),
+                    land)
           .Build(),
       context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("land/tablet.xml")).Build(), land,
-                    "tablet")
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("land/tablet.xml")).Build(),
+                    land, "tablet")
           .Build(),
       context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("port/default.xml")).Build(), port)
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("port/default.xml")).Build(),
+                    port)
           .Build(),
       context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("port/tablet.xml")).Build(), port,
-                    "tablet")
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("port/tablet.xml")).Build(),
+                    port, "tablet")
           .Build(),
       context->GetDiagnostics()));
 
@@ -74,13 +76,14 @@
   ResourceTable table;
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("default.xml")).Build())
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("default.xml")).Build())
           .Build(),
       context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("tablet.xml")).Build(), {}, "tablet")
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("tablet.xml")).Build(), {},
+                    "tablet")
           .Build(),
       context->GetDiagnostics()));
   ;
@@ -102,20 +105,21 @@
   ResourceTable table;
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("default.xml")).Build())
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("default.xml")).Build())
           .Build(),
       context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("tablet.xml")).Build(), {}, "tablet")
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("tablet.xml")).Build(), {},
+                    "tablet")
           .Build(),
       context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("no-sdcard.xml")).Build(), {},
-                    "no-sdcard")
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("no-sdcard.xml")).Build(),
+                    {}, "no-sdcard")
           .Build(),
       context->GetDiagnostics()));
 
@@ -127,15 +131,15 @@
   std::unique_ptr<IAaptContext> context = test::ContextBuilder().Build();
 
   ResourceTable table;
-  ASSERT_TRUE(
-      table.AddResource(NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-                            .SetValue(test::ValueBuilder<Id>().SetSource(Source(".xml")).Build())
-                            .Build(),
-                        context->GetDiagnostics()));
+  ASSERT_TRUE(table.AddResource(
+      NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source(".xml")).Build())
+          .Build(),
+      context->GetDiagnostics()));
 
   ASSERT_TRUE(table.AddResource(
       NewResourceBuilder(test::ParseNameOrDie("android:string/one"))
-          .SetValue(test::ValueBuilder<Id>().SetSource(Source("default.xml")).Build(), {},
+          .SetValue(test::ValueBuilder<Id>().SetSource(android::Source("default.xml")).Build(), {},
                     "default")
           .Build(),
       context->GetDiagnostics()));
diff --git a/tools/aapt2/link/ReferenceLinker.cpp b/tools/aapt2/link/ReferenceLinker.cpp
index d1fbffa..f2a93a8 100644
--- a/tools/aapt2/link/ReferenceLinker.cpp
+++ b/tools/aapt2/link/ReferenceLinker.cpp
@@ -16,16 +16,15 @@
 
 #include "link/ReferenceLinker.h"
 
-#include "android-base/logging.h"
-#include "android-base/stringprintf.h"
-#include "androidfw/ResourceTypes.h"
-
-#include "Diagnostics.h"
 #include "ResourceParser.h"
 #include "ResourceTable.h"
 #include "ResourceUtils.h"
 #include "ResourceValues.h"
 #include "ValueVisitor.h"
+#include "android-base/logging.h"
+#include "android-base/stringprintf.h"
+#include "androidfw/IDiagnostics.h"
+#include "androidfw/ResourceTypes.h"
 #include "link/Linkers.h"
 #include "process/IResourceTableConsumer.h"
 #include "process/SymbolTable.h"
@@ -82,7 +81,7 @@
     if (auto ref = ValueCast<Reference>(linked_item_ptr)) {
       return std::unique_ptr<Reference>(ref);
     }
-    context_->GetDiagnostics()->Error(DiagMessage(value->GetSource())
+    context_->GetDiagnostics()->Error(android::DiagMessage(value->GetSource())
                                       << "value of '"
                                       << LoggingResourceName(*value, callsite_, package_decls_)
                                       << "' must be a resource reference");
@@ -130,7 +129,7 @@
       // check is fast and we avoid creating a DiagMessage when the match is successful.
       if (!symbol->attribute->Matches(*entry.value, nullptr)) {
         // The actual type of this item is incompatible with the attribute.
-        DiagMessage msg(entry.key.GetSource());
+        android::DiagMessage msg(entry.key.GetSource());
 
         // Call the matches method again, this time with a DiagMessage so we fill in the actual
         // error message.
@@ -139,7 +138,7 @@
         error_ = true;
       }
     } else {
-      context_->GetDiagnostics()->Error(DiagMessage(entry.key.GetSource())
+      context_->GetDiagnostics()->Error(android::DiagMessage(entry.key.GetSource())
                                         << "style attribute '"
                                         << LoggingResourceName(entry.key, callsite_, package_decls_)
                                         << "' " << err_str);
@@ -344,7 +343,7 @@
 
 void ReferenceLinker::WriteAttributeName(const Reference& ref, const CallSite& callsite,
                                          const xml::IPackageDeclStack* decls,
-                                         DiagMessage* out_msg) {
+                                         android::DiagMessage* out_msg) {
   CHECK(out_msg != nullptr);
   if (!ref.name) {
     *out_msg << ref.id.value();
@@ -393,7 +392,7 @@
     auto result = table->FindResource(transformed_reference.name.value());
     if (!result || result.value().entry->values.empty()) {
       context->GetDiagnostics()->Error(
-          DiagMessage(reference.GetSource())
+          android::DiagMessage(reference.GetSource())
           << "failed to find definition for "
           << LoggingResourceName(transformed_reference, callsite, decls));
       return {};
@@ -424,7 +423,7 @@
                                               macro_values[0]->config, *context->GetDiagnostics());
     if (new_value == nullptr) {
       context->GetDiagnostics()->Error(
-          DiagMessage(reference.GetSource())
+          android::DiagMessage(reference.GetSource())
           << "failed to substitute macro "
           << LoggingResourceName(transformed_reference, callsite, decls)
           << ": failed to parse contents as one of type(s) " << Attribute::MaskString(type_flags));
@@ -450,7 +449,7 @@
     return std::move(new_ref);
   }
 
-  context->GetDiagnostics()->Error(DiagMessage(reference.GetSource())
+  context->GetDiagnostics()->Error(android::DiagMessage(reference.GetSource())
                                    << "resource "
                                    << LoggingResourceName(transformed_reference, callsite, decls)
                                    << " " << err_str);
@@ -473,17 +472,16 @@
 
         // Symbol state information may be lost if there is no value for the resource.
         if (entry->visibility.level != Visibility::Level::kUndefined && entry->values.empty()) {
-          context->GetDiagnostics()->Error(DiagMessage(entry->visibility.source)
-                                               << "no definition for declared symbol '" << name
-                                               << "'");
+          context->GetDiagnostics()->Error(android::DiagMessage(entry->visibility.source)
+                                           << "no definition for declared symbol '" << name << "'");
           error = true;
         }
 
         // Ensure that definitions for values declared as overlayable exist
         if (entry->overlayable_item && entry->values.empty()) {
-          context->GetDiagnostics()->Error(DiagMessage(entry->overlayable_item.value().source)
-                                           << "no definition for overlayable symbol '"
-                                           << name << "'");
+          context->GetDiagnostics()->Error(
+              android::DiagMessage(entry->overlayable_item.value().source)
+              << "no definition for overlayable symbol '" << name << "'");
           error = true;
         }
 
diff --git a/tools/aapt2/link/ReferenceLinker.h b/tools/aapt2/link/ReferenceLinker.h
index b460853..9fb25e1 100644
--- a/tools/aapt2/link/ReferenceLinker.h
+++ b/tools/aapt2/link/ReferenceLinker.h
@@ -32,7 +32,7 @@
 class ReferenceLinkerTransformer : public CloningValueTransformer {
  public:
   ReferenceLinkerTransformer(const CallSite& callsite, IAaptContext* context, SymbolTable* symbols,
-                             StringPool* string_pool, ResourceTable* table,
+                             android::StringPool* string_pool, ResourceTable* table,
                              xml::IPackageDeclStack* decl)
       : CloningValueTransformer(string_pool),
         callsite_(callsite),
@@ -110,7 +110,8 @@
 
   // Same as WriteResourceName but omits the 'attr' part.
   static void WriteAttributeName(const Reference& ref, const CallSite& callsite,
-                                 const xml::IPackageDeclStack* decls, DiagMessage* out_msg);
+                                 const xml::IPackageDeclStack* decls,
+                                 android::DiagMessage* out_msg);
 
   // Returns a fully linked version a resource reference.
   //
diff --git a/tools/aapt2/link/ResourceExcluder.cpp b/tools/aapt2/link/ResourceExcluder.cpp
index b3b9dc4..59393cb 100644
--- a/tools/aapt2/link/ResourceExcluder.cpp
+++ b/tools/aapt2/link/ResourceExcluder.cpp
@@ -50,12 +50,9 @@
 
     if (masked_diff == 0) {
       if (context->IsVerbose()) {
-        context->GetDiagnostics()->Note(
-            DiagMessage(value->value->GetSource())
-                << "excluded resource \""
-                << entry->name
-                << "\" with config "
-                << config.toString());
+        context->GetDiagnostics()->Note(android::DiagMessage(value->value->GetSource())
+                                        << "excluded resource \"" << entry->name
+                                        << "\" with config " << config.toString());
       }
       value->value = {};
       return;
diff --git a/tools/aapt2/link/TableMerger.cpp b/tools/aapt2/link/TableMerger.cpp
index caaaba6..c9f0964 100644
--- a/tools/aapt2/link/TableMerger.cpp
+++ b/tools/aapt2/link/TableMerger.cpp
@@ -37,7 +37,7 @@
   CHECK(main_package_ != nullptr) << "package name or ID already taken";
 }
 
-bool TableMerger::Merge(const Source& src, ResourceTable* table, bool overlay) {
+bool TableMerger::Merge(const android::Source& src, ResourceTable* table, bool overlay) {
   TRACE_CALL();
   // We allow adding new resources if this is not an overlay, or if the options allow overlays
   // to add new resources.
@@ -45,7 +45,8 @@
 }
 
 // This will merge packages with the same package name (or no package name).
-bool TableMerger::MergeImpl(const Source& src, ResourceTable* table, bool overlay, bool allow_new) {
+bool TableMerger::MergeImpl(const android::Source& src, ResourceTable* table, bool overlay,
+                            bool allow_new) {
   bool error = false;
   for (auto& package : table->packages) {
     // Only merge an empty package or the package we're building.
@@ -65,13 +66,14 @@
 
 // This will merge and mangle resources from a static library. It is assumed that all FileReferences
 // have correctly set their io::IFile*.
-bool TableMerger::MergeAndMangle(const Source& src, const StringPiece& package_name,
+bool TableMerger::MergeAndMangle(const android::Source& src, const StringPiece& package_name,
                                  ResourceTable* table) {
   bool error = false;
   for (auto& package : table->packages) {
     // Warn of packages with an unrelated ID.
     if (package_name != package->name) {
-      context_->GetDiagnostics()->Warn(DiagMessage(src) << "ignoring package " << package->name);
+      context_->GetDiagnostics()->Warn(android::DiagMessage(src)
+                                       << "ignoring package " << package->name);
       continue;
     }
 
@@ -82,8 +84,8 @@
   return !error;
 }
 
-static bool MergeType(IAaptContext* context, const Source& src, ResourceTableType* dst_type,
-                      ResourceTableType* src_type) {
+static bool MergeType(IAaptContext* context, const android::Source& src,
+                      ResourceTableType* dst_type, ResourceTableType* src_type) {
   if (src_type->visibility_level >= dst_type->visibility_level) {
     // The incoming type's visibility is stronger, so we should override the visibility.
     dst_type->visibility_level = src_type->visibility_level;
@@ -91,15 +93,15 @@
   return true;
 }
 
-static bool MergeEntry(IAaptContext* context, const Source& src,
-                       ResourceEntry* dst_entry, ResourceEntry* src_entry,
-                       bool strict_visibility) {
+static bool MergeEntry(IAaptContext* context, const android::Source& src, ResourceEntry* dst_entry,
+                       ResourceEntry* src_entry, bool strict_visibility) {
   if (strict_visibility
       && dst_entry->visibility.level != Visibility::Level::kUndefined
       && src_entry->visibility.level != dst_entry->visibility.level) {
-      context->GetDiagnostics()->Error(
-          DiagMessage(src) << "cannot merge resource '" << dst_entry->name << "' with conflicting visibilities: "
-                           << "public and private");
+    context->GetDiagnostics()->Error(android::DiagMessage(src)
+                                     << "cannot merge resource '" << dst_entry->name
+                                     << "' with conflicting visibilities: "
+                                     << "public and private");
     return false;
   }
 
@@ -114,8 +116,9 @@
              dst_entry->visibility.level == Visibility::Level::kPublic && dst_entry->id &&
              src_entry->id && src_entry->id != dst_entry->id) {
     // Both entries are public and have different IDs.
-    context->GetDiagnostics()->Error(DiagMessage(src) << "cannot merge entry '" << src_entry->name
-                                                      << "': conflicting public IDs");
+    context->GetDiagnostics()->Error(android::DiagMessage(src)
+                                     << "cannot merge entry '" << src_entry->name
+                                     << "': conflicting public IDs");
     return false;
   }
 
@@ -139,11 +142,12 @@
 
         // Do not allow a resource with an overlayable declaration to have that overlayable
         // declaration redefined.
-        context->GetDiagnostics()->Error(DiagMessage(src_entry->overlayable_item.value().source)
-                                             << "duplicate overlayable declaration for resource '"
-                                             << src_entry->name << "'");
-        context->GetDiagnostics()->Error(DiagMessage(dst_entry->overlayable_item.value().source)
-                                             << "previous declaration here");
+        context->GetDiagnostics()->Error(
+            android::DiagMessage(src_entry->overlayable_item.value().source)
+            << "duplicate overlayable declaration for resource '" << src_entry->name << "'");
+        context->GetDiagnostics()->Error(
+            android::DiagMessage(dst_entry->overlayable_item.value().source)
+            << "previous declaration here");
         return false;
       }
     }
@@ -154,10 +158,10 @@
   if (src_entry->staged_id) {
     if (dst_entry->staged_id &&
         dst_entry->staged_id.value().id != src_entry->staged_id.value().id) {
-      context->GetDiagnostics()->Error(DiagMessage(src_entry->staged_id.value().source)
+      context->GetDiagnostics()->Error(android::DiagMessage(src_entry->staged_id.value().source)
                                        << "conflicting staged id declaration for resource '"
                                        << src_entry->name << "'");
-      context->GetDiagnostics()->Error(DiagMessage(dst_entry->staged_id.value().source)
+      context->GetDiagnostics()->Error(android::DiagMessage(dst_entry->staged_id.value().source)
                                        << "previous declaration here");
     }
     dst_entry->staged_id = std::move(src_entry->staged_id);
@@ -174,7 +178,7 @@
 // If both values are Styleables/Styles, we just merge them into the existing value.
 static ResourceTable::CollisionResult ResolveMergeCollision(
     bool override_styles_instead_of_overlaying, Value* existing, Value* incoming,
-    StringPool* pool) {
+    android::StringPool* pool) {
   if (Styleable* existing_styleable = ValueCast<Styleable>(existing)) {
     if (Styleable* incoming_styleable = ValueCast<Styleable>(incoming)) {
       // Styleables get merged.
@@ -194,13 +198,10 @@
   return ResourceTable::ResolveValueCollision(existing, incoming);
 }
 
-static ResourceTable::CollisionResult MergeConfigValue(IAaptContext* context,
-                                                       const ResourceNameRef& res_name,
-                                                       bool overlay,
-                                                       bool override_styles_instead_of_overlaying,
-                                                       ResourceConfigValue* dst_config_value,
-                                                       ResourceConfigValue* src_config_value,
-                                                       StringPool* pool) {
+static ResourceTable::CollisionResult MergeConfigValue(
+    IAaptContext* context, const ResourceNameRef& res_name, bool overlay,
+    bool override_styles_instead_of_overlaying, ResourceConfigValue* dst_config_value,
+    ResourceConfigValue* src_config_value, android::StringPool* pool) {
   using CollisionResult = ResourceTable::CollisionResult;
 
   Value* dst_value = dst_config_value->value.get();
@@ -220,18 +221,18 @@
     }
 
     // Error!
-    context->GetDiagnostics()->Error(DiagMessage(src_value->GetSource())
+    context->GetDiagnostics()->Error(android::DiagMessage(src_value->GetSource())
                                      << "resource '" << res_name << "' has a conflicting value for "
                                      << "configuration (" << src_config_value->config << ")");
-    context->GetDiagnostics()->Note(DiagMessage(dst_value->GetSource())
+    context->GetDiagnostics()->Note(android::DiagMessage(dst_value->GetSource())
                                     << "originally defined here");
     return CollisionResult::kConflict;
   }
   return collision_result;
 }
 
-bool TableMerger::DoMerge(const Source& src, ResourceTablePackage* src_package, bool mangle_package,
-                          bool overlay, bool allow_new_resources) {
+bool TableMerger::DoMerge(const android::Source& src, ResourceTablePackage* src_package,
+                          bool mangle_package, bool overlay, bool allow_new_resources) {
   bool error = false;
 
   for (auto& src_type : src_package->types) {
@@ -257,11 +258,12 @@
       const ResourceNameRef res_name(src_package->name, src_type->named_type, src_entry->name);
 
       if (!dst_entry) {
-        context_->GetDiagnostics()->Error(DiagMessage(src)
+        context_->GetDiagnostics()->Error(android::DiagMessage(src)
                                           << "resource " << res_name
                                           << " does not override an existing resource");
-        context_->GetDiagnostics()->Note(DiagMessage(src) << "define an <add-resource> tag or use "
-                                                          << "--auto-add-overlay");
+        context_->GetDiagnostics()->Note(android::DiagMessage(src)
+                                         << "define an <add-resource> tag or use "
+                                         << "--auto-add-overlay");
         error = true;
         continue;
       }
diff --git a/tools/aapt2/link/TableMerger.h b/tools/aapt2/link/TableMerger.h
index e01a0c1..2ba2123 100644
--- a/tools/aapt2/link/TableMerger.h
+++ b/tools/aapt2/link/TableMerger.h
@@ -67,11 +67,12 @@
 
   // Merges resources from the same or empty package. This is for local sources.
   // If overlay is true, the resources are treated as overlays.
-  bool Merge(const Source& src, ResourceTable* table, bool overlay);
+  bool Merge(const android::Source& src, ResourceTable* table, bool overlay);
 
   // Merges resources from the given package, mangling the name. This is for static libraries.
   // All FileReference values must have their io::IFile set.
-  bool MergeAndMangle(const Source& src, const android::StringPiece& package, ResourceTable* table);
+  bool MergeAndMangle(const android::Source& src, const android::StringPiece& package,
+                      ResourceTable* table);
 
   // Merges a compiled file that belongs to this same or empty package.
   bool MergeFile(const ResourceFile& fileDesc, bool overlay, io::IFile* file);
@@ -85,9 +86,10 @@
   ResourceTablePackage* main_package_;
   std::set<std::string> merged_packages_;
 
-  bool MergeImpl(const Source& src, ResourceTable* src_table, bool overlay, bool allow_new);
+  bool MergeImpl(const android::Source& src, ResourceTable* src_table, bool overlay,
+                 bool allow_new);
 
-  bool DoMerge(const Source& src, ResourceTablePackage* src_package, bool mangle_package,
+  bool DoMerge(const android::Source& src, ResourceTablePackage* src_package, bool mangle_package,
                bool overlay, bool allow_new_resources);
 
   std::unique_ptr<FileReference> CloneAndMangleFile(const std::string& package,
diff --git a/tools/aapt2/link/TableMerger_test.cpp b/tools/aapt2/link/TableMerger_test.cpp
index 4cbf2d3..56a7c3b 100644
--- a/tools/aapt2/link/TableMerger_test.cpp
+++ b/tools/aapt2/link/TableMerger_test.cpp
@@ -94,7 +94,7 @@
   ResourceFile file_desc;
   file_desc.config = test::ParseConfigOrDie("hdpi-v4");
   file_desc.name = test::ParseNameOrDie("layout/main");
-  file_desc.source = Source("res/layout-hdpi/main.xml");
+  file_desc.source = android::Source("res/layout-hdpi/main.xml");
   test::TestFile test_file("path/to/res/layout-hdpi/main.xml.flat");
 
   ASSERT_TRUE(merger.MergeFile(file_desc, false /*overlay*/, &test_file));
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_) {
diff --git a/tools/aapt2/link/XmlCompatVersioner.h b/tools/aapt2/link/XmlCompatVersioner.h
index 9980618..22f9828 100644
--- a/tools/aapt2/link/XmlCompatVersioner.h
+++ b/tools/aapt2/link/XmlCompatVersioner.h
@@ -45,7 +45,7 @@
 
   virtual std::vector<DegradeResult> Degrade(const xml::Element& src_el,
                                              const xml::Attribute& src_attr,
-                                             StringPool* out_string_pool) const = 0;
+                                             android::StringPool* out_string_pool) const = 0;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(IDegradeRule);
@@ -70,7 +70,7 @@
   void ProcessRule(const xml::Element& src_el, const xml::Attribute& src_attr,
                    const ApiVersion& src_attr_version, const IDegradeRule* rule,
                    const util::Range<ApiVersion>& api_range, bool generated, xml::Element* dst_el,
-                   std::set<ApiVersion>* out_apis_referenced, StringPool* out_string_pool);
+                   std::set<ApiVersion>* out_apis_referenced, android::StringPool* out_string_pool);
 
   const Rules* rules_;
 };
@@ -87,7 +87,7 @@
   virtual ~DegradeToManyRule() = default;
 
   std::vector<DegradeResult> Degrade(const xml::Element& src_el, const xml::Attribute& src_attr,
-                                     StringPool* out_string_pool) const override;
+                                     android::StringPool* out_string_pool) const override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(DegradeToManyRule);
diff --git a/tools/aapt2/link/XmlReferenceLinker.cpp b/tools/aapt2/link/XmlReferenceLinker.cpp
index 1f8548b..d2e9bd7 100644
--- a/tools/aapt2/link/XmlReferenceLinker.cpp
+++ b/tools/aapt2/link/XmlReferenceLinker.cpp
@@ -14,14 +14,12 @@
  * limitations under the License.
  */
 
-#include "link/Linkers.h"
-
-#include "androidfw/ResourceTypes.h"
-
-#include "Diagnostics.h"
 #include "ResourceUtils.h"
 #include "SdkConstants.h"
 #include "ValueVisitor.h"
+#include "androidfw/IDiagnostics.h"
+#include "androidfw/ResourceTypes.h"
+#include "link/Linkers.h"
 #include "link/ReferenceLinker.h"
 #include "process/IResourceTableConsumer.h"
 #include "process/SymbolTable.h"
@@ -38,7 +36,7 @@
  public:
   using xml::PackageAwareVisitor::Visit;
 
-  XmlVisitor(const Source& source, StringPool* pool, const CallSite& callsite,
+  XmlVisitor(const android::Source& source, android::StringPool* pool, const CallSite& callsite,
              IAaptContext* context, ResourceTable* table, SymbolTable* symbols)
       : source_(source),
         callsite_(callsite),
@@ -61,7 +59,7 @@
       }
     }
 
-    const Source source = source_.WithLine(el->line_number);
+    const android::Source source = source_.WithLine(el->line_number);
     for (xml::Attribute& attr : el->attributes) {
       // If the attribute has no namespace, interpret values as if
       // they were assigned to the default Attribute.
@@ -80,7 +78,7 @@
             ReferenceLinker::CompileXmlAttribute(attr_ref, callsite_, context_, symbols_, &err_str);
 
         if (!attr.compiled_attribute) {
-          DiagMessage error_msg(source);
+          android::DiagMessage error_msg(source);
           error_msg << "attribute ";
           ReferenceLinker::WriteAttributeName(attr_ref, callsite_, this, &error_msg);
           error_msg << " " << err_str;
@@ -99,7 +97,7 @@
         attr.compiled_value = attr.compiled_value->Transform(reference_transformer_);
       } else if ((attribute->type_mask & android::ResTable_map::TYPE_STRING) == 0) {
         // We won't be able to encode this as a string.
-        DiagMessage msg(source);
+        android::DiagMessage msg(source);
         msg << "'" << attr.value << "' is incompatible with attribute " << attr.name << " "
             << *attribute;
         context_->GetDiagnostics()->Error(msg);
@@ -118,7 +116,7 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(XmlVisitor);
 
-  Source source_;
+  android::Source source_;
   const CallSite& callsite_;
   IAaptContext* context_;
   SymbolTable* symbols_;
