Switch ResourceName to use ResourceNamedType instead of ResourceType.
DD: go/custom-resource-types-in-aapt2
Bug: b/215108200
Test: Resource_test.cpp
Change-Id: I0b97fc0024523700e01adce788bb934d388da288
diff --git a/tools/aapt2/java/ProguardRules.cpp b/tools/aapt2/java/ProguardRules.cpp
index 4a2d0ae..e53e220 100644
--- a/tools/aapt2/java/ProguardRules.cpp
+++ b/tools/aapt2/java/ProguardRules.cpp
@@ -358,7 +358,7 @@
return false;
}
- switch (res->file.name.type) {
+ switch (res->file.name.type.type) {
case ResourceType::kLayout: {
LayoutVisitor visitor(res->file, keep_set);
res->root->Accept(&visitor);
@@ -465,7 +465,7 @@
locations->insert(location);
// TODO: allow for more reference types if we can determine its safe.
- if (location.name.type != ResourceType::kLayout) {
+ if (location.name.type.type != ResourceType::kLayout) {
return false;
}