mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
Added checking if array has string item.
This will resolve Contacts.apk and Camera.apk FC issue.
This commit is contained in:
parent
cc2e973ba4
commit
67af608286
@ -66,11 +66,24 @@ public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializab
|
||||
if (! "string".equals(type) && ! "integer".equals(type)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean hasDifferentTypeItem = false;
|
||||
|
||||
for (int i = 1; i < mItems.length; i++) {
|
||||
if (! type.equals(mItems[i].getType())) {
|
||||
String itemType = mItems[i].getType();
|
||||
|
||||
if (itemType.equals("string")) {
|
||||
//If there is at least one string item in mixed bag, it must be string-array.
|
||||
return "string";
|
||||
} else if (!type.equals(itemType)) {
|
||||
hasDifferentTypeItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasDifferentTypeItem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user