Don't depend on String8 cast to C string
Bug: 295394788
Test: m checkbuild
Change-Id: I6aa039b6b2a4944e3537ef133f8785890d957edd
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 800466a..43a8b52 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -401,7 +401,7 @@
Vector<String8> getNfcAidCategories(AssetManager& assets, const String8& xmlPath, bool offHost,
String8 *outError = NULL)
{
- Asset* aidAsset = assets.openNonAsset(xmlPath, Asset::ACCESS_BUFFER);
+ Asset* aidAsset = assets.openNonAsset(xmlPath.c_str(), Asset::ACCESS_BUFFER);
if (aidAsset == NULL) {
if (outError != NULL) *outError = "xml resource does not exist";
return Vector<String8>();
@@ -2760,7 +2760,7 @@
appendPath(dependencyFile, "R.java.d");
}
// Make sure we have a clean dependency file to start with
- fp = fopen(dependencyFile, "w");
+ fp = fopen(dependencyFile.c_str(), "w");
fclose(fp);
}
@@ -2849,7 +2849,7 @@
if (bundle->getGenDependencies()) {
// Now that writeResourceSymbols or writeAPK has taken care of writing
// the targets to our dependency file, we'll write the prereqs
- fp = fopen(dependencyFile, "a+");
+ fp = fopen(dependencyFile.c_str(), "a+");
fprintf(fp, " : ");
bool includeRaw = (outputAPKFile != NULL);
err = writeDependencyPreReqs(bundle, assets, fp, includeRaw);