diff options
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r-- | tools/aapt/Command.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 60f3f2715395..800466aa587f 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -12,6 +12,7 @@ #include "ResourceTable.h" #include "XMLNode.h" +#include <androidfw/PathUtils.h> #include <utils/Errors.h> #include <utils/KeyedVector.h> #include <utils/List.h> @@ -2486,12 +2487,12 @@ int doAdd(Bundle* bundle) for (int i = 1; i < bundle->getFileSpecCount(); i++) { const char* fileName = bundle->getFileSpecEntry(i); - if (strcasecmp(String8(fileName).getPathExtension().c_str(), ".gz") == 0) { + if (strcasecmp(getPathExtension(String8(fileName)).c_str(), ".gz") == 0) { printf(" '%s'... (from gzip)\n", fileName); - result = zip->addGzip(fileName, String8(fileName).getBasePath().c_str(), NULL); + result = zip->addGzip(fileName, getBasePath(String8(fileName)).c_str(), NULL); } else { if (bundle->getJunkPath()) { - String8 storageName = String8(fileName).getPathLeaf(); + String8 storageName = getPathLeaf(String8(fileName)); printf(" '%s' as '%s'...\n", fileName, ResTable::normalizeForOutput(storageName.c_str()).c_str()); result = zip->add(fileName, storageName.c_str(), @@ -2617,10 +2618,10 @@ static String8 buildApkName(const String8& original, const sp<ApkSplit>& split) return original; } - String8 ext(original.getPathExtension()); + String8 ext(getPathExtension(original)); if (ext == String8(".apk")) { return String8::format("%s_%s%s", - original.getBasePath().c_str(), + getBasePath(original).c_str(), split->getDirectorySafeName().c_str(), ext.c_str()); } @@ -2756,7 +2757,7 @@ int doPackage(Bundle* bundle) // generate the dependency file in the R.java package subdirectory // e.g. gen/com/foo/app/R.java.d dependencyFile = String8(bundle->getRClassDir()); - dependencyFile.appendPath("R.java.d"); + appendPath(dependencyFile, "R.java.d"); } // Make sure we have a clean dependency file to start with fp = fopen(dependencyFile, "w"); |