diff options
author | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2018-12-15 23:06:51 +0000 |
---|---|---|
committer | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | 2018-12-15 23:06:51 +0000 |
commit | 6ffda879f23648c8b432c94ef15ee3a8bf3545be (patch) | |
tree | c3cabbf31427472185daea8affa6e49368f9dabc /tools/aapt2/Debug.cpp | |
parent | ce9ab45c7fb9ca7468f7ab51e80c9747eafa8d0d (diff) | |
parent | 062f698bc713f2f57bb4f3a175f507f31a84e409 (diff) |
Snap for 5183987 from 062f698bc713f2f57bb4f3a175f507f31a84e409 to q-keystone-qcom-release
Change-Id: I7548c5662184dd4e8dfafd29c767b8e4c074dd5d
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r-- | tools/aapt2/Debug.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 0a517ab8a2de..583f14ac0cbd 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -306,8 +306,29 @@ void Debug::PrintTable(const ResourceTable& table, const DebugPrintTableOptions& break; } - if (entry->overlayable) { - printer->Print(" OVERLAYABLE"); + for (size_t i = 0; i < entry->overlayable_declarations.size(); i++) { + printer->Print((i == 0) ? " " : "|"); + printer->Print("OVERLAYABLE"); + + if (entry->overlayable_declarations[i].policy) { + switch (entry->overlayable_declarations[i].policy.value()) { + case Overlayable::Policy::kProduct: + printer->Print("_PRODUCT"); + break; + case Overlayable::Policy::kProductServices: + printer->Print("_PRODUCT_SERVICES"); + break; + case Overlayable::Policy::kSystem: + printer->Print("_SYSTEM"); + break; + case Overlayable::Policy::kVendor: + printer->Print("_VENDOR"); + break; + case Overlayable::Policy::kPublic: + printer->Print("_PUBLIC"); + break; + } + } } printer->Println(); @@ -410,7 +431,7 @@ void Debug::DumpHex(const void* data, size_t len) { void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* printer) { using namespace android; - + if (pool->getError() == NO_INIT) { printer->Print("String pool is unitialized.\n"); return; @@ -439,7 +460,7 @@ void Debug::DumpResStringPool(const android::ResStringPool* pool, text::Printer* const size_t NS = pool->size(); for (size_t s=0; s<NS; s++) { String8 str = pool->string8ObjectAt(s); - printer->Print(StringPrintf("String #%zd : %s\n", s, str.string())); + printer->Print(StringPrintf("String #%zd: %s\n", s, str.string())); } } |