Loading tools/aapt2/xml/XmlDom.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -236,16 +236,22 @@ static void CopyAttributes(Element* el, android::ResXMLParser* parser, StringPoo attr.name = util::Utf16ToUtf8(StringPiece16(str16, len)); } uint32_t res_id = parser->getAttributeNameResID(i); if (res_id > 0) { attr.compiled_attribute = AaptAttribute(::aapt::Attribute(), {res_id}); } str16 = parser->getAttributeStringValue(i, &len); if (str16) { attr.value = util::Utf16ToUtf8(StringPiece16(str16, len)); } } else { android::Res_value res_value; if (parser->getAttributeValue(i, &res_value) > 0) { attr.compiled_value = ResourceUtils::ParseBinaryResValue( ResourceType::kAnim, {}, parser->getStrings(), res_value, out_pool); } } el->attributes.push_back(std::move(attr)); } Loading Loading
tools/aapt2/xml/XmlDom.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -236,16 +236,22 @@ static void CopyAttributes(Element* el, android::ResXMLParser* parser, StringPoo attr.name = util::Utf16ToUtf8(StringPiece16(str16, len)); } uint32_t res_id = parser->getAttributeNameResID(i); if (res_id > 0) { attr.compiled_attribute = AaptAttribute(::aapt::Attribute(), {res_id}); } str16 = parser->getAttributeStringValue(i, &len); if (str16) { attr.value = util::Utf16ToUtf8(StringPiece16(str16, len)); } } else { android::Res_value res_value; if (parser->getAttributeValue(i, &res_value) > 0) { attr.compiled_value = ResourceUtils::ParseBinaryResValue( ResourceType::kAnim, {}, parser->getStrings(), res_value, out_pool); } } el->attributes.push_back(std::move(attr)); } Loading