diff options
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r-- | tools/aapt/Resource.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index ae4bdc8..1724c8c 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -2256,11 +2256,11 @@ writeProguardFile(Bundle* bundle, const sp<AaptAssets>& assets) return err; } -status_t -writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, FILE* fp) +// Loops through the string paths and writes them to the file pointer +// Each file path is written on its own line with a terminating backslash. +status_t writePathsToFile(const sp<FilePathStore>& files, FILE* fp) { status_t deps = -1; - sp<FilePathStore> files = assets->getFullResPaths(); for (size_t file_i = 0; file_i < files->size(); ++file_i) { // Add the full file path to the dependency file fprintf(fp, "%s \\\n", files->itemAt(file_i).string()); @@ -2268,3 +2268,14 @@ writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, FILE* fp) } return deps; } + +status_t +writeDependencyPreReqs(Bundle* bundle, const sp<AaptAssets>& assets, FILE* fp, bool includeRaw) +{ + status_t deps = -1; + deps += writePathsToFile(assets->getFullResPaths(), fp); + if (includeRaw) { + deps += writePathsToFile(assets->getFullAssetPaths(), fp); + } + return deps; +} |