summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-04-30 17:40:46 -0700
committerAdam Lesinski <adamlesinski@google.com>2015-05-04 16:43:24 -0700
commit6ff19664f9279023c96e5a65c3059e1ef4beac0f (patch)
treef193586403acb034359ffbba1f9211827918fe07 /tools/aapt2/ResourceTable.cpp
parent24aad163bc88cb10d2275385e9afc3de7f342d65 (diff)
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
Diffstat (limited to 'tools/aapt2/ResourceTable.cpp')
-rw-r--r--tools/aapt2/ResourceTable.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index 7f55395b0cd5..94688606391a 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -299,16 +299,12 @@ bool ResourceTable::markPublic(const ResourceNameRef& name, const ResourceId res
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;
}