summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Butcher <nickbutcher@google.com>2018-01-09 15:24:21 +0000
committerNick Butcher <nickbutcher@google.com>2018-02-09 11:36:27 +0000
commite78a8169665c19b5539508f113093b6c2a4b80de (patch)
tree0f645728f1a25f71a0db4046d96226bc3d77afb6
parentc8b76fe1f4d48aadf07c479dc9412d6b344bab1a (diff)
Prevent AAPT from versioning <animated-selector> tags.
Bug: 69359529 Test: Manually tested with ag/3178054 Change-Id: I10ae4d96c2a31a0a7c363d7a9292ecdfd3bb526a
-rw-r--r--tools/aapt/ResourceTable.cpp4
-rw-r--r--tools/aapt2/cmd/Link.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 669afe18af88..734a5ab8aab4 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -4848,6 +4848,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
const String16 pathInterpolator16("pathInterpolator");
const String16 objectAnimator16("objectAnimator");
const String16 gradient16("gradient");
+ const String16 animatedSelector16("animated-selector");
const int minSdk = getMinSdkVersion(bundle);
if (minSdk >= SDK_LOLLIPOP_MR1) {
@@ -4876,7 +4877,8 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
node->getElementName() == animatedVector16 ||
node->getElementName() == objectAnimator16 ||
node->getElementName() == pathInterpolator16 ||
- node->getElementName() == gradient16)) {
+ node->getElementName() == gradient16 ||
+ node->getElementName() == animatedSelector16)) {
// We were told not to version vector tags, so skip the children here.
continue;
}
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp
index 1afd283a430a..15c5eaecd102 100644
--- a/tools/aapt2/cmd/Link.cpp
+++ b/tools/aapt2/cmd/Link.cpp
@@ -450,7 +450,7 @@ 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 == "objectAnimator" || name == "gradient" || name == "animated-selector";
}
template <typename T>