diff options
author | Adam Lesinski <adamlesinski@google.com> | 2017-12-08 16:06:10 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2018-01-11 13:54:11 -0800 |
commit | 73bff1e8519bb73f17a801f45977d41b69b5b0d0 (patch) | |
tree | 9ac5f4e491ed617b6cefe118b91edb637c6c35a4 /tools/aapt2/format/binary/TableFlattener_test.cpp | |
parent | 14c2ae4a6e62b78f2c994112d08dbe3d4de64695 (diff) |
AAPT2: Allow compatible duplicate Attributes
If a resource XML file defines two compatible Attributes, they should
be merged without throwing an error. Ex:
<declare-styleable>
<attr name="conflict" format="string" />
</declare-styleable>
<declare-styleable>
<attr name="conflict" format="string|reference" />
</declare-styleable>
In this case, string|reference and string are the same, so these should
merge correctly.
Bug: 65699599
Test: make aapt2_tests
Test: make AaptBasicTest
Change-Id: I7b0f956d2332f7f0b458acd59ca0a606b2cfdf95
Diffstat (limited to 'tools/aapt2/format/binary/TableFlattener_test.cpp')
-rw-r--r-- | tools/aapt2/format/binary/TableFlattener_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt2/format/binary/TableFlattener_test.cpp b/tools/aapt2/format/binary/TableFlattener_test.cpp index 51ccdc7359b2..bab70109fc65 100644 --- a/tools/aapt2/format/binary/TableFlattener_test.cpp +++ b/tools/aapt2/format/binary/TableFlattener_test.cpp @@ -215,7 +215,7 @@ TEST_F(TableFlattenerTest, FlattenEntriesWithGapsInIds) { } TEST_F(TableFlattenerTest, FlattenMinMaxAttributes) { - Attribute attr(false); + Attribute attr; attr.type_mask = android::ResTable_map::TYPE_INTEGER; attr.min_int = 10; attr.max_int = 23; |