mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
currently build errors. Trying to fix the <string-array> vs <array> problem.
This commit is contained in:
parent
036cce8df1
commit
e716c0a972
@ -68,18 +68,11 @@ public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializab
|
|||||||
if (!"string".equals(type) && !"integer".equals(type)) {
|
if (!"string".equals(type) && !"integer".equals(type)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 1; i < mItems.length; i++) {
|
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 null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ public class BuildAndDecodeTest {
|
|||||||
@Test
|
@Test
|
||||||
public void valuesArraysTest() throws BrutException {
|
public void valuesArraysTest() throws BrutException {
|
||||||
compareValuesFiles("values-mcc001/arrays.xml");
|
compareValuesFiles("values-mcc001/arrays.xml");
|
||||||
|
compareValuesFiles("values-mcc002/arrays.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -20,8 +20,4 @@
|
|||||||
<item>10.0sp</item>
|
<item>10.0sp</item>
|
||||||
<item>#ff123456</item>
|
<item>#ff123456</item>
|
||||||
</array>
|
</array>
|
||||||
<string-array name="test_array4">
|
|
||||||
<item>@string/test_string1</item>
|
|
||||||
<item>@string/test_string2</item>
|
|
||||||
</string-array>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user