Add attr resource type handling

This commit is contained in:
Shaheen Gandhi 2019-07-02 19:23:33 -04:00
parent 1b91cec1f1
commit 2bc8feb549
2 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,7 @@ public final class ResTypeSpec {
public static final String RES_TYPE_NAME_ARRAY = "array";
public static final String RES_TYPE_NAME_PLURALS = "plurals";
public static final String RES_TYPE_NAME_STYLES = "style";
public static final String RES_TYPE_NAME_ATTR = "attr";
private final String mName;
private final Map<String, ResResSpec> mResSpecs = new LinkedHashMap<String, ResResSpec>();

View File

@ -112,6 +112,10 @@ public class ResValueFactory {
return new ResStyleValue(parentVal, items, this);
}
if (ResTypeSpec.RES_TYPE_NAME_ATTR.equals(resTypeName)) {
return new ResAttr(parentVal, 0, null, null, null);
}
throw new AndrolibException("unsupported res type name for bags. Found: " + resTypeName);
}