From 94e4a01dec2ac26f49808c2fe7011855ea5614f6 Mon Sep 17 00:00:00 2001 From: Donald Chai Date: Mon, 6 Jan 2020 13:52:41 -0800 Subject: Add option to avoid clobbering visibility of "aapt2 compile" marks styleables as public instead of preserving information from or --visibility options. This behavior can now be disabled via --preserve-visibility-of-styleables. Bug: 146649511 Change-Id: Ifb8ab396573d1393df737a59625e79e9cf2494a7 Tested: aapt2_tests --- tools/aapt2/ResourceParser.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/aapt2/ResourceParser.h') diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h index 06bb0c9cf264..9d3ecc866c5d 100644 --- a/tools/aapt2/ResourceParser.h +++ b/tools/aapt2/ResourceParser.h @@ -46,6 +46,12 @@ struct ResourceParserOptions { */ bool error_on_positional_arguments = true; + /** + * If true, apply the same visibility rules for styleables as are used for + * all other resources. Otherwise, all styleables will be made public. + */ + bool preserve_visibility_of_styleables = false; + // If visibility was forced, we need to use it when creating a new resource and also error if we // try to parse the , , or tags. Maybe visibility; -- cgit v1.2.3-59-g8ed1b