AAPT2: Record public status in a more robust way
This allows us to store the source and comments of a resource's
public declaration and avoids issues where there is no default
configuration for a publicly declared resource (like with drawables
of various densities) and AAPT2 mistakenly took this as an error.
Change-Id: I07a2fe9f551daefcce842f205fb219d2fa453ebc
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index 7f55395..9468860 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -299,16 +299,12 @@
type->publicStatus.isPublic = true;
entry->publicStatus.isPublic = true;
+ entry->publicStatus.source = source;
if (resId.isValid()) {
type->typeId = resId.typeId();
entry->entryId = resId.entryId();
}
-
- if (entry->values.empty()) {
- entry->values.push_back(ResourceConfigValue{ {}, source, {},
- util::make_unique<Sentinel>() });
- }
return true;
}