diff options
author | 2023-04-24 18:34:13 -0700 | |
---|---|---|
committer | 2023-04-24 21:19:31 -0700 | |
commit | cf91ab81e1e7867572f9a4f71cf2c8e69fe13dd8 (patch) | |
tree | cc62f0b8e72348ecb16dd4d47d5fe41b15c521e6 /tools/aapt2/Debug.cpp | |
parent | 10ffac5bfd3f324d2c16af939e540663672e5b66 (diff) |
[aapt2] Add DynamicRefTable to dump resources
aapt used to print the referenced packages table
in the dump resources command, add the same to aapt2
Bug: 279529151
Test: unit tests
Change-Id: If1d577ae85ab76f2a7cbcfe4b9087e49bd540572
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r-- | tools/aapt2/Debug.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index df878899fa28..cac4edd8db21 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -265,6 +265,16 @@ void Debug::PrintTable(const ResourceTable& table, const DebugPrintTableOptions& ValueHeadlinePrinter headline_printer(package.name, printer); ValueBodyPrinter body_printer(package.name, printer); + auto& dynamicRefTable = table.GetReferencedPackages(); + if (!dynamicRefTable.empty()) { + printer->Println(StringPrintf("DynamicRefTable entryCount=%d", int(dynamicRefTable.size()))); + printer->Indent(); + for (auto&& [id, name] : dynamicRefTable) { + printer->Println(StringPrintf("0x%02x -> %s", id, name.c_str())); + } + printer->Undent(); + } + printer->Print("Package name="); printer->Print(package.name); if (package.id) { |