summaryrefslogtreecommitdiff
path: root/tools/aapt2/Debug.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-10-16 14:37:48 -0700
committerAdam Lesinski <adamlesinski@google.com>2015-10-22 12:52:49 -0700
commit9e10ac70155c993e7053323ad36beaea7bf7d54f (patch)
tree6d5ba83f2ff0e6ff0a0ac1fede1154902b3f14ab /tools/aapt2/Debug.cpp
parent5359893effd12bac156505e1ad3a77a30d27cc0a (diff)
AAPT2: Process <java-symbols> and private symbol package
Need to introduce the idea of multiple levels of visibility to support <java-symbol>. Public, Private, Undefined. Public means it is accessible from outside and requires an ID assigned. Private means that we explicitly want this to be a symbol (show up in R.java), but not visible to other packages. No ID required. Undefined is any normal resource. When --private-symbols is specified in the link phase, these resources will not show up in R.java. Change-Id: Icba89221e08e685dee7683786aa7112baf28c856
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r--tools/aapt2/Debug.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp
index 84f438520e90..d864f664f9db 100644
--- a/tools/aapt2/Debug.cpp
+++ b/tools/aapt2/Debug.cpp
@@ -124,17 +124,18 @@ void Debug::printTable(ResourceTable* table) {
}
for (const ResourceEntry* entry : sortedEntries) {
- ResourceId id = {
- package->id ? package->id.value() : uint8_t(0),
- type->id ? type->id.value() : uint8_t(0),
- entry->id ? entry->id.value() : uint16_t(0)
- };
+ ResourceId id(package->id ? package->id.value() : uint8_t(0),
+ type->id ? type->id.value() : uint8_t(0),
+ entry->id ? entry->id.value() : uint16_t(0));
+ ResourceName name(package->name, type->type, entry->name);
- ResourceName name = { package->name, type->type, entry->name };
std::cout << " spec resource " << id << " " << name;
- if (entry->publicStatus.isPublic) {
- std::cout << " PUBLIC";
+ switch (entry->symbolStatus.state) {
+ case SymbolState::kPublic: std::cout << " PUBLIC"; break;
+ case SymbolState::kPrivate: std::cout << " _PRIVATE_"; break;
+ default: break;
}
+
std::cout << std::endl;
PrintVisitor visitor;