summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceValues.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2019-09-05 16:53:23 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-09-05 16:53:23 +0000
commitd191463bb0a528d3dc97a21b85ad83374b27c239 (patch)
tree425b31516b5d8b1530a6fcf90a9661d5878f08b4 /tools/aapt2/ResourceValues.cpp
parent3f275ca900aac74865a2f83eeda36a064661ff80 (diff)
parente199ca954dff7fdfb06e6280695d34a957ed5efc (diff)
Merge "DO NOT MERGE - Merge Android 10 into master"
Diffstat (limited to 'tools/aapt2/ResourceValues.cpp')
-rw-r--r--tools/aapt2/ResourceValues.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index 34b46c552e0c..696012786e6d 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -574,6 +574,10 @@ bool Attribute::Equals(const Value* value) const {
}
bool Attribute::IsCompatibleWith(const Attribute& attr) const {
+ if (Equals(&attr)) {
+ return true;
+ }
+
// If the high bits are set on any of these attribute type masks, then they are incompatible.
// We don't check that flags and enums are identical.
if ((type_mask & ~android::ResTable_map::TYPE_ANY) != 0 ||