From a00d969c9cc5fe5ed40b26e9d10bbc96a6b6aec9 Mon Sep 17 00:00:00 2001 From: Winson Date: Thu, 24 Jan 2019 15:55:29 -0800 Subject: Prevent AAPT2 from versioning tags In AAPT, if --no-version-vectors is added and an XML file is a vector, it prevents the entire XML's contents, including children attributes, from being split by version for compat. In AAPT2, each element is checked individually, and so "set" has to be ignored manually. Bug: 111056281 Test: Compiled avd_progress_indeterminate_horizontal.xml linked in bug Change-Id: I20a7888f36cf5923b6dd8e3b701243c74f8d421b --- tools/aapt2/cmd/Link.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp index 729447ee1de5..662743d1fbb7 100644 --- a/tools/aapt2/cmd/Link.cpp +++ b/tools/aapt2/cmd/Link.cpp @@ -399,7 +399,8 @@ static bool IsTransitionElement(const std::string& name) { static bool IsVectorElement(const std::string& name) { return name == "vector" || name == "animated-vector" || name == "pathInterpolator" || - name == "objectAnimator" || name == "gradient" || name == "animated-selector"; + name == "objectAnimator" || name == "gradient" || name == "animated-selector" || + name == "set"; } template -- cgit v1.2.3-59-g8ed1b