From 6ff19664f9279023c96e5a65c3059e1ef4beac0f Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Thu, 30 Apr 2015 17:40:46 -0700 Subject: 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 --- tools/aapt2/ResourceTable.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tools/aapt2/ResourceTable.cpp') 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() }); - } return true; } -- cgit v1.2.3-59-g8ed1b