fix array type values being misrepresented due to incorrect index

This commit is contained in:
Connor Tumbleson 2014-05-25 12:37:14 -05:00
parent db68deb41a
commit c29dffe554
3 changed files with 7 additions and 2 deletions

View File

@ -39,6 +39,7 @@ v2.0.0 (TBA)
-Fixed (issue #609) - Fixed handling renamed manifests with ("android", "com.htc" and "miui").
-Fixed (issue #626) - Fixed handling strange characters with unknown files.
-Fixed (issue #630) - Fixed handling renamed manifests with ("com.lge")
-Fixed (issue #409) - Fixed array items incorrectly typed.
-Fixed issue with non-URI standard characters in apk name (Thanks rover12421)
-Added output to list Apktool version to help debugging.
-Updated known bytes for configurations to 38 (from addition of layout direction)

View File

@ -66,8 +66,7 @@ public class ResArrayValue extends ResBagValue implements
return null;
}
String type = mItems[0].getType();
for (int i = 1; i < mItems.length; i++) {
for (int i = 0; i < mItems.length; i++) {
if (mItems[i].encodeAsResXmlItemValue().startsWith("@string")) {
return "string";
} else if (mItems[i].encodeAsResXmlItemValue().startsWith("@drawable")) {

View File

@ -23,4 +23,9 @@
<item>10.0sp</item>
<item>#ff123456</item>
</array>
<string-array name="issue_409">
<item>@string/test1</item>
<item>foo</item>
<item>foo2</item>
</string-array>
</resources>