diff options
author | 2023-08-17 16:27:22 +0000 | |
---|---|---|
committer | 2023-09-12 22:31:10 +0000 | |
commit | 835dfe50a73c6f6de581aaa143c333af79bcca4d (patch) | |
tree | 0bec830cab5de4388aafc4af0e357bfc327be1a0 /tools/aapt/Resource.cpp | |
parent | a235f8ba91dd467b245f680887e2a75507814b4e (diff) |
Don't depend on String8 cast to C string
Bug: 295394788
Test: m checkbuild
Change-Id: I6aa039b6b2a4944e3537ef133f8785890d957edd
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; |