diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-08-07 21:26:53 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2014-08-21 11:00:09 -0700 |
commit | 6a7d2757a936ee79b8dba2055139c8b71130c58e (patch) | |
tree | cf709a074ba681da1001e5394931d5442ad75979 /tools/aapt/Resource.cpp | |
parent | 223ddaa74d39cb0afabd2d3f3e4ae3ae4bdba572 (diff) | |
download | frameworks_base-6a7d2757a936ee79b8dba2055139c8b71130c58e.zip frameworks_base-6a7d2757a936ee79b8dba2055139c8b71130c58e.tar.gz frameworks_base-6a7d2757a936ee79b8dba2055139c8b71130c58e.tar.bz2 |
Use the correct versionCode for Split APKs
Insert the correct versionCode into the generated
Split AndroidManifest.xml.
Change-Id: I0aec797b5a4ff8bd70f9394b18aee5ad292b37c8
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r-- | tools/aapt/Resource.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 0a80805..869a6fc 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -770,7 +770,14 @@ status_t massageManifest(Bundle* bundle, sp<XMLNode> root) if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "versionCode", bundle->getVersionCode(), errorOnFailedInsert, replaceVersion)) { return UNKNOWN_ERROR; + } else { + const XMLNode::attribute_entry* attr = root->getAttribute( + String16(RESOURCES_ANDROID_NAMESPACE), String16("versionCode")); + if (attr != NULL) { + bundle->setVersionCode(strdup(String8(attr->string).string())); + } } + if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "versionName", bundle->getVersionName(), errorOnFailedInsert, replaceVersion)) { return UNKNOWN_ERROR; |