summaryrefslogtreecommitdiff
path: root/tools/aapt/Resource.cpp
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-09-13 21:26:45 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-09-13 21:26:45 +0000
commit41363ba9fceec76e0233db8889d75e986b91f39a (patch)
treea503827eb2943bb7e44c42c319a9f284c8e17cd8 /tools/aapt/Resource.cpp
parent545d8455698f29d35c3ed0b85139016d5a15eb0c (diff)
parent835dfe50a73c6f6de581aaa143c333af79bcca4d (diff)
Merge "Don't depend on String8 cast to C string" into main
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r--tools/aapt/Resource.cpp10
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;