Loading tools/aapt/Bundle.h +3 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,8 @@ public: void setVersionName(const char* val) { mVersionName = val; } bool getReplaceVersion() { return mReplaceVersion; } void setReplaceVersion(bool val) { mReplaceVersion = val; } const android::String8& getRevisionCode() { return mRevisionCode; } void setRevisionCode(const char* val) { mRevisionCode = android::String8(val); } const char* getCustomPackage() const { return mCustomPackage; } void setCustomPackage(const char* val) { mCustomPackage = val; } const char* getExtraPackages() const { return mExtraPackages; } Loading Loading @@ -297,6 +299,7 @@ private: android::String8 mFeatureOfPackage; android::String8 mFeatureAfterPackage; android::String8 mRevisionCode; const char* mManifestMinSdkVersion; const char* mMinSdkVersion; const char* mTargetSdkVersion; Loading tools/aapt/Resource.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,11 @@ static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets, assets->setPackage(String8(block.getAttributeStringValue(nameIndex, &len))); ssize_t revisionCodeIndex = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE, "revisionCode"); if (revisionCodeIndex >= 0) { bundle->setRevisionCode(String8(block.getAttributeStringValue(revisionCodeIndex, &len)).string()); } String16 uses_sdk16("uses-sdk"); while ((code=block.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) { Loading Loading @@ -1075,6 +1080,14 @@ status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& a return UNKNOWN_ERROR; } // Add the 'revisionCode' attribute, which is set to the original revisionCode. if (bundle->getRevisionCode().size() > 0) { if (!addTagAttribute(manifest, RESOURCES_ANDROID_NAMESPACE, "revisionCode", bundle->getRevisionCode().string(), true, true)) { return UNKNOWN_ERROR; } } // Add the 'split' attribute which describes the configurations included. String8 splitName("config."); splitName.append(split->getPackageSafeName()); Loading Loading
tools/aapt/Bundle.h +3 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,8 @@ public: void setVersionName(const char* val) { mVersionName = val; } bool getReplaceVersion() { return mReplaceVersion; } void setReplaceVersion(bool val) { mReplaceVersion = val; } const android::String8& getRevisionCode() { return mRevisionCode; } void setRevisionCode(const char* val) { mRevisionCode = android::String8(val); } const char* getCustomPackage() const { return mCustomPackage; } void setCustomPackage(const char* val) { mCustomPackage = val; } const char* getExtraPackages() const { return mExtraPackages; } Loading Loading @@ -297,6 +299,7 @@ private: android::String8 mFeatureOfPackage; android::String8 mFeatureAfterPackage; android::String8 mRevisionCode; const char* mManifestMinSdkVersion; const char* mMinSdkVersion; const char* mTargetSdkVersion; Loading
tools/aapt/Resource.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,11 @@ static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets, assets->setPackage(String8(block.getAttributeStringValue(nameIndex, &len))); ssize_t revisionCodeIndex = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE, "revisionCode"); if (revisionCodeIndex >= 0) { bundle->setRevisionCode(String8(block.getAttributeStringValue(revisionCodeIndex, &len)).string()); } String16 uses_sdk16("uses-sdk"); while ((code=block.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) { Loading Loading @@ -1075,6 +1080,14 @@ status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& a return UNKNOWN_ERROR; } // Add the 'revisionCode' attribute, which is set to the original revisionCode. if (bundle->getRevisionCode().size() > 0) { if (!addTagAttribute(manifest, RESOURCES_ANDROID_NAMESPACE, "revisionCode", bundle->getRevisionCode().string(), true, true)) { return UNKNOWN_ERROR; } } // Add the 'split' attribute which describes the configurations included. String8 splitName("config."); splitName.append(split->getPackageSafeName()); Loading