mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
handle the correct use of <array>,<string-array>,<integer-array>. Fixes FC with Contacts,Camera,T9Map with some APKs
This commit is contained in:
parent
e716c0a972
commit
ebb2f6d623
@ -65,11 +65,15 @@ public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializab
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String type = mItems[0].getType();
|
String type = mItems[0].getType();
|
||||||
if (!"string".equals(type) && !"integer".equals(type)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
for (int i = 1; i < mItems.length; i++) {
|
for (int i = 1; i < mItems.length; i++) {
|
||||||
if (! type.equals(mItems[i].getType())) {
|
|
||||||
|
if (mItems[i].encodeAsResXmlItemValue().startsWith("@string")) {
|
||||||
|
return "string";
|
||||||
|
} else if (mItems[i].encodeAsResXmlItemValue().startsWith("@drawable")) {
|
||||||
|
return null;
|
||||||
|
} else if (!"string".equals(type) && !"integer".equals(type)) {
|
||||||
|
return null;
|
||||||
|
} else if (!type.equals(mItems[i].getType())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user