Minor: remove isResourceDeclarationOrUsage

This commit is contained in:
Yan Zhulanow
2015-04-03 17:35:15 +03:00
parent bc4a342a38
commit cc697d2c1a
3 changed files with 12 additions and 21 deletions
@@ -42,12 +42,9 @@ class AndroidXmlVisitor(val elementCallback: (String, String, XmlAttribute) -> U
if (idAttribute != null) {
val idAttributeValue = idAttribute.getValue()
if (idAttributeValue != null) {
val classAttributeValue = tag?.getAttribute(AndroidConst.CLASS_ATTRIBUTE_NO_NAMESPACE)?.getValue()
val xmlType = classAttributeValue ?: localName
if (isResourceDeclarationOrUsage(idAttributeValue)) {
val name = idToName(idAttributeValue)
if (name != null) elementCallback(name, xmlType, idAttribute)
}
val xmlType = tag?.getAttribute(AndroidConst.CLASS_ATTRIBUTE_NO_NAMESPACE)?.getValue() ?: localName
val name = idToName(idAttributeValue)
if (name != null) elementCallback(name, xmlType, idAttribute)
}
}
tag?.acceptChildren(this)