summaryrefslogtreecommitdiff
path: root/tools/aapt2/Debug.cpp
diff options
context:
space:
mode:
author Jeremy Meyer <jakmcbane@google.com> 2024-08-23 17:29:03 -0700
committer Jeremy Meyer <jakmcbane@google.com> 2024-09-25 14:50:54 -0700
commit3d8d4a18c2bd4d697692ea30471852c90e7a3775 (patch)
tree19f6ae00972e306ed53d18712bc3893f2b973b42 /tools/aapt2/Debug.cpp
parentb7ab38e10e1f0d3088153f070e681e34263d393c (diff)
Error on duplicate resource with same disabled flag
Also realized I hadn't handled flag negation so added that as well. Test: Automated Bug: 329436914 Flag: EXEMPT Aconfig not supported on host tools Change-Id: If90ae71070306f8e0c367be7e652da9c7bd0bb22
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r--tools/aapt2/Debug.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp
index df1d51e37660..064b4617b0a2 100644
--- a/tools/aapt2/Debug.cpp
+++ b/tools/aapt2/Debug.cpp
@@ -346,6 +346,21 @@ void Debug::PrintTable(const ResourceTable& table, const DebugPrintTableOptions&
value->value->Accept(&body_printer);
printer->Undent();
}
+ printer->Println("Flag disabled values:");
+ for (const auto& value : entry.flag_disabled_values) {
+ printer->Print("(");
+ printer->Print(value->config.to_string());
+ printer->Print(") ");
+ value->value->Accept(&headline_printer);
+ if (options.show_sources && !value->value->GetSource().path.empty()) {
+ printer->Print(" src=");
+ printer->Print(value->value->GetSource().to_string());
+ }
+ printer->Println();
+ printer->Indent();
+ value->value->Accept(&body_printer);
+ printer->Undent();
+ }
printer->Undent();
}
}