currently build errors. Trying to fix the <string-array> vs <array> problem.

This commit is contained in:
Connor Tumbleson 2012-08-27 07:56:33 -05:00
parent 036cce8df1
commit e716c0a972
4 changed files with 9 additions and 12 deletions

View File

@ -68,18 +68,11 @@ public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializab
if (!"string".equals(type) && !"integer".equals(type)) {
return null;
}
for (int i = 1; i < mItems.length; i++) {
if (StringUtils.containsIgnoreCase("@string", mItems[i].encodeAsResXmlItemValue()) || mItems[i].getType().equalsIgnoreCase("string")) {
return "string";
}
if (!type.equals(mItems[i].getType())) {
if (! type.equals(mItems[i].getType())) {
return null;
}
}
return type;
}

View File

@ -60,6 +60,7 @@ public class BuildAndDecodeTest {
@Test
public void valuesArraysTest() throws BrutException {
compareValuesFiles("values-mcc001/arrays.xml");
compareValuesFiles("values-mcc002/arrays.xml");
}
@Test

View File

@ -20,8 +20,4 @@
<item>10.0sp</item>
<item>#ff123456</item>
</array>
<string-array name="test_array4">
<item>@string/test_string1</item>
<item>@string/test_string2</item>
</string-array>
</resources>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="test_array4">
<item>@string/test_string1</item>
<item>@string/test_string2</item>
</string-array>
</resources>