diff options
author | 2023-09-13 23:04:25 +0000 | |
---|---|---|
committer | 2023-09-13 23:04:25 +0000 | |
commit | 834467bdcc1a799ece112553070593bbd4940455 (patch) | |
tree | ff090d8a29609368f294044451100befff6ce5eb /tools/aapt/Resource.cpp | |
parent | 36a4442577e66659f9769c32b52315cec4a4acf6 (diff) | |
parent | d001ea5b7242f110530e339d479b28b29dadc242 (diff) |
Merge "Don't depend on String8 cast to C string" into main am: 41363ba9fc am: d001ea5b72
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2748044
Change-Id: Icc8df7b364fcda5e6cc734bdbef49e2d7dc43b76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r-- | tools/aapt/Resource.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 3a198fd43d48..7e4e186ec320 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -924,7 +924,7 @@ status_t massageManifest(Bundle* bundle, ResourceTable* table, sp<XMLNode> root) if (bundle->getCompileSdkVersion() != 0) { if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "compileSdkVersion", - String8::format("%d", bundle->getCompileSdkVersion()), + String8::format("%d", bundle->getCompileSdkVersion()).c_str(), errorOnFailedInsert, true)) { return UNKNOWN_ERROR; } @@ -932,21 +932,21 @@ status_t massageManifest(Bundle* bundle, ResourceTable* table, sp<XMLNode> root) if (bundle->getCompileSdkVersionCodename() != "") { if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "compileSdkVersionCodename", - bundle->getCompileSdkVersionCodename(), errorOnFailedInsert, true)) { + bundle->getCompileSdkVersionCodename().c_str(), errorOnFailedInsert, true)) { return UNKNOWN_ERROR; } } if (bundle->getPlatformBuildVersionCode() != "") { if (!addTagAttribute(root, "", "platformBuildVersionCode", - bundle->getPlatformBuildVersionCode(), errorOnFailedInsert, true)) { + bundle->getPlatformBuildVersionCode().c_str(), errorOnFailedInsert, true)) { return UNKNOWN_ERROR; } } if (bundle->getPlatformBuildVersionName() != "") { if (!addTagAttribute(root, "", "platformBuildVersionName", - bundle->getPlatformBuildVersionName(), errorOnFailedInsert, true)) { + bundle->getPlatformBuildVersionName().c_str(), errorOnFailedInsert, true)) { return UNKNOWN_ERROR; } } @@ -1210,7 +1210,7 @@ status_t generateAndroidManifestForSplit(Bundle* bundle, const sp<AaptAssets>& a sp<XMLNode> manifest = XMLNode::newElement(filename, String16(), String16("manifest")); // Add the 'package' attribute which is set to the package name. - const char* packageName = assets->getPackage(); + const char* packageName = assets->getPackage().c_str(); const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride(); if (manifestPackageNameOverride != NULL) { packageName = manifestPackageNameOverride; |