Switch ResourceTable to use ResourceNamedType instead of ResourceType.

DD: go/custom-resource-types-in-aapt2

Bug: b/215108200
Test: existing
Change-Id: If9ddcd529dff66c8ec4238f56ab64391c2f44c28
diff --git a/tools/aapt2/cmd/Diff.cpp b/tools/aapt2/cmd/Diff.cpp
index d9e8c92..a854146 100644
--- a/tools/aapt2/cmd/Diff.cpp
+++ b/tools/aapt2/cmd/Diff.cpp
@@ -105,7 +105,7 @@
   Value* value_b = config_value_b->value.get();
   if (!value_a->Equals(value_b)) {
     std::stringstream str_stream;
-    str_stream << "value " << pkg_a.name << ":" << type_a.type << "/" << entry_a.name
+    str_stream << "value " << pkg_a.name << ":" << type_a.named_type << "/" << entry_a.name
                << " config=" << config_value_a->config << " does not match:\n";
     value_a->Print(&str_stream);
     str_stream << "\n vs \n";
@@ -128,7 +128,7 @@
     auto config_value_b = entry_b.FindValue(config_value_a->config);
     if (!config_value_b) {
       std::stringstream str_stream;
-      str_stream << "missing " << pkg_a.name << ":" << type_a.type << "/" << entry_a.name
+      str_stream << "missing " << pkg_a.name << ":" << type_a.named_type << "/" << entry_a.name
                  << " config=" << config_value_a->config;
       EmitDiffLine(apk_b->GetSource(), str_stream.str());
       diff = true;
@@ -143,7 +143,7 @@
     auto config_value_a = entry_a.FindValue(config_value_b->config);
     if (!config_value_a) {
       std::stringstream str_stream;
-      str_stream << "new config " << pkg_b.name << ":" << type_b.type << "/" << entry_b.name
+      str_stream << "new config " << pkg_b.name << ":" << type_b.named_type << "/" << entry_b.name
                  << " config=" << config_value_b->config;
       EmitDiffLine(apk_b->GetSource(), str_stream.str());
       diff = true;
@@ -164,13 +164,15 @@
     if (entry_b_iter == type_b.entries.end()) {
       // Type A contains a type that type B does not have.
       std::stringstream str_stream;
-      str_stream << "missing " << pkg_a.name << ":" << type_a.type << "/" << entry_a_iter->name;
+      str_stream << "missing " << pkg_a.name << ":" << type_a.named_type << "/"
+                 << entry_a_iter->name;
       EmitDiffLine(apk_a->GetSource(), str_stream.str());
       diff = true;
     } else if (entry_a_iter == type_a.entries.end()) {
       // Type B contains a type that type A does not have.
       std::stringstream str_stream;
-      str_stream << "new entry " << pkg_b.name << ":" << type_b.type << "/" << entry_b_iter->name;
+      str_stream << "new entry " << pkg_b.name << ":" << type_b.named_type << "/"
+                 << entry_b_iter->name;
       EmitDiffLine(apk_b->GetSource(), str_stream.str());
       diff = true;
     } else {
@@ -178,7 +180,7 @@
       const auto& entry_b = *entry_b_iter;
       if (IsSymbolVisibilityDifferent(entry_a.visibility, entry_b.visibility)) {
         std::stringstream str_stream;
-        str_stream << pkg_a.name << ":" << type_a.type << "/" << entry_a.name
+        str_stream << pkg_a.name << ":" << type_a.named_type << "/" << entry_a.name
                    << " has different visibility (";
         if (entry_b.visibility.staged_api) {
           str_stream << "STAGED ";
@@ -203,7 +205,7 @@
       } else if (IsIdDiff(entry_a.visibility.level, entry_a.id, entry_b.visibility.level,
                           entry_b.id)) {
         std::stringstream str_stream;
-        str_stream << pkg_a.name << ":" << type_a.type << "/" << entry_a.name
+        str_stream << pkg_a.name << ":" << type_a.named_type << "/" << entry_a.name
                    << " has different public ID (";
         if (entry_b.id) {
           str_stream << "0x" << std::hex << entry_b.id.value();
@@ -243,13 +245,13 @@
     if (type_b_iter == pkg_b.types.end()) {
       // Type A contains a type that type B does not have.
       std::stringstream str_stream;
-      str_stream << "missing " << pkg_a.name << ":" << type_a_iter->type;
+      str_stream << "missing " << pkg_a.name << ":" << type_a_iter->named_type;
       EmitDiffLine(apk_a->GetSource(), str_stream.str());
       diff = true;
     } else if (type_a_iter == pkg_a.types.end()) {
       // Type B contains a type that type A does not have.
       std::stringstream str_stream;
-      str_stream << "new type " << pkg_b.name << ":" << type_b_iter->type;
+      str_stream << "new type " << pkg_b.name << ":" << type_b_iter->named_type;
       EmitDiffLine(apk_b->GetSource(), str_stream.str());
       diff = true;
     } else {
@@ -257,7 +259,7 @@
       const auto& type_b = *type_b_iter;
       if (type_a.visibility_level != type_b.visibility_level) {
         std::stringstream str_stream;
-        str_stream << pkg_a.name << ":" << type_a.type << " has different visibility (";
+        str_stream << pkg_a.name << ":" << type_a.named_type << " has different visibility (";
         if (type_b.visibility_level == Visibility::Level::kPublic) {
           str_stream << "PUBLIC";
         } else {
@@ -274,7 +276,7 @@
         diff = true;
       } else if (IsIdDiff(type_a.visibility_level, type_a.id, type_b.visibility_level, type_b.id)) {
         std::stringstream str_stream;
-        str_stream << pkg_a.name << ":" << type_a.type << " has different public ID (";
+        str_stream << pkg_a.name << ":" << type_a.named_type << " has different public ID (";
         if (type_b.id) {
           str_stream << "0x" << std::hex << type_b.id.value();
         } else {