From 835dfe50a73c6f6de581aaa143c333af79bcca4d Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Thu, 17 Aug 2023 16:27:22 +0000 Subject: Don't depend on String8 cast to C string Bug: 295394788 Test: m checkbuild Change-Id: I6aa039b6b2a4944e3537ef133f8785890d957edd --- tools/aapt/Command.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/aapt/Command.cpp') diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 800466aa587f..43a8b52f2766 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -401,7 +401,7 @@ static void printUsesImpliedPermission(const String8& name, const String8& reaso Vector 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(); @@ -2760,7 +2760,7 @@ int doPackage(Bundle* bundle) 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 @@ int doPackage(Bundle* bundle) 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); -- cgit v1.2.3-59-g8ed1b