summaryrefslogtreecommitdiff
path: root/tools/aapt/XMLNode.cpp
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2010-01-06 15:46:38 -0600
committerJeff Hamilton <jham@android.com>2010-02-01 18:47:01 -0600
commit2fee0ed6eb99b211efa06f095a41268a2021214a (patch)
treebc7ce3df25a1d7ec1f61fb85ef56899dab5eb66b /tools/aapt/XMLNode.cpp
parent7188f946521d64ea21121939d2a4c279f33fe910 (diff)
Add the --rename-manifest-package option to aapt.
It allows you to force override the manifest package listed in the AndroidManifest.xml when creating an APK file. Change-Id: I7eac7943c4e56610b65728ae54773a273634fd9d
Diffstat (limited to 'tools/aapt/XMLNode.cpp')
-rw-r--r--tools/aapt/XMLNode.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index 036dde44f0e3..4c5928880d9e 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -555,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;