mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
Merge pull request #16 from iAmGhost/master
Fix for Contacts.apk and Camera.apk FC
This commit is contained in:
commit
62b2e6a03c
@ -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())) {
|
||||
return null;
|
||||
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