Commit c74b7f20 authored by sergey-wowwow's avatar sergey-wowwow Committed by skylot

fix: generates XML key names if empty (#394) (PR #615)

parent 9d22b3ca
...@@ -221,6 +221,9 @@ public class ResTableParser extends CommonBinaryParser { ...@@ -221,6 +221,9 @@ public class ResTableParser extends CommonBinaryParser {
int resRef = pkg.getId() << 24 | typeId << 16 | entryId; int resRef = pkg.getId() << 24 | typeId << 16 | entryId;
String typeName = pkg.getTypeStrings()[typeId - 1]; String typeName = pkg.getTypeStrings()[typeId - 1];
String keyName = pkg.getKeyStrings()[key]; String keyName = pkg.getKeyStrings()[key];
if(keyName.isEmpty()) {
keyName = "RES_" + resRef; // autogenerate key name
}
ResourceEntry ri = new ResourceEntry(resRef, pkg.getName(), typeName, keyName); ResourceEntry ri = new ResourceEntry(resRef, pkg.getName(), typeName, keyName);
ri.setConfig(config); ri.setConfig(config);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment