AAPT2: add flag for strict visibility
Will only detect whether a resource was defined as both 'public' and
'private' (but will allow overriding 'undefined' visiblity for now).
Test: TableMerger_test + manual
Bug: 72735798
Change-Id: If0749559c91c4d8820a6286fc9ddc80209c1e5e9
diff --git a/tools/aapt2/link/TableMerger.h b/tools/aapt2/link/TableMerger.h
index 47e23dd..24c5e13 100644
--- a/tools/aapt2/link/TableMerger.h
+++ b/tools/aapt2/link/TableMerger.h
@@ -35,6 +35,8 @@
struct TableMergerOptions {
// If true, resources in overlays can be added without previously having existed.
bool auto_add_overlay = false;
+ // If true, resource overlays with conflicting visibility are not allowed.
+ bool strict_visibility = false;
};
// TableMerger takes resource tables and merges all packages within the tables that have the same