summaryrefslogtreecommitdiff
path: root/tools/aapt2/integration-tests
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-06-13 16:03:55 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-06-15 11:14:47 -0700
commit3124e7ca0f582c8d54a9b4cf560c25dfef77ac2a (patch)
treebe1af462cdec9a4808a49901cfb87fbe47b32a24 /tools/aapt2/integration-tests
parent52feccbf41fe58921e66686077cb5ab20b2b0b13 (diff)
AAPT2: Fix issue with enums and integer attributes
When an attribute had the format "enum|integer", and a max or min allowed value set, any value set for this attribute would have its enum symbol's value checked against the valid integer range. This would lead to the following: android:numColumns="autofit" being interpreted as an integer value of -1, which violated the minimum expected value for numColumns, which was 0. Bug: 62358540 Test: make aapt2_tests Change-Id: I3150410448a533d3595a08ac6b2966264db874d8
Diffstat (limited to 'tools/aapt2/integration-tests')
-rw-r--r--tools/aapt2/integration-tests/AppOne/res/values/styles.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/aapt2/integration-tests/AppOne/res/values/styles.xml b/tools/aapt2/integration-tests/AppOne/res/values/styles.xml
index f05845cfab28..19d96c0809db 100644
--- a/tools/aapt2/integration-tests/AppOne/res/values/styles.xml
+++ b/tools/aapt2/integration-tests/AppOne/res/values/styles.xml
@@ -25,6 +25,7 @@
<style name="Pop">
<item name="custom">@android:drawable/btn_default</item>
<item name="android:focusable">true</item>
+ <item name="android:numColumns">auto_fit</item>
</style>
<string name="yo">@string/wow</string>