summaryrefslogtreecommitdiffstats
path: root/tools/aapt/XMLNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt/XMLNode.cpp')
-rw-r--r--tools/aapt/XMLNode.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index d4d2a45..4c59288 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -478,6 +478,7 @@ XMLNode::XMLNode(const String8& filename, const String16& s1, const String16& s2
, mFilename(filename)
, mStartLineNumber(0)
, mEndLineNumber(0)
+ , mUTF8(false)
{
if (isNamespace) {
mNamespacePrefix = s1;
@@ -554,6 +555,19 @@ const XMLNode::attribute_entry* XMLNode::getAttribute(const String16& ns,
return NULL;
}
+XMLNode::attribute_entry* XMLNode::editAttribute(const String16& ns,
+ const String16& name)
+{
+ for (size_t i=0; i<mAttributes.size(); i++) {
+ attribute_entry * ae = &mAttributes.editItemAt(i);
+ if (ae->ns == ns && ae->name == name) {
+ return ae;
+ }
+ }
+
+ return NULL;
+}
+
const String16& XMLNode::getCData() const
{
return mChars;
@@ -837,7 +851,7 @@ status_t XMLNode::assignResourceIds(const sp<AaptAssets>& assets,
status_t XMLNode::flatten(const sp<AaptFile>& dest,
bool stripComments, bool stripRawValues) const
{
- StringPool strings;
+ StringPool strings = StringPool(false, mUTF8);
Vector<uint32_t> resids;
// First collect just the strings for attribute names that have a