Correctly decode arrays.xml

- #1453
 - temporarily cast unknown enum (0) to ResArray
This commit is contained in:
Connor Tumbleson 2017-05-24 08:09:05 -04:00
parent 0e6eaf9e67
commit 15c4f333a5
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -90,7 +90,8 @@ public class ResValueFactory {
if (key == ResAttr.BAG_KEY_ATTR_TYPE) {
return ResAttr.factory(parentVal, items, this, mPackage);
}
if (key == ResArrayValue.BAG_KEY_ARRAY_START) {
// Android O Preview added an unknown enum for ResTable_map. This is hardcoded as 0 for now.
if (key == ResArrayValue.BAG_KEY_ARRAY_START || key == 0) {
return new ResArrayValue(parentVal, items);
}
if (key >= ResPluralsValue.BAG_KEY_PLURALS_START && key <= ResPluralsValue.BAG_KEY_PLURALS_END) {