From: Xavier Ducrohet Date: Thu, 21 Jul 2011 00:18:04 +0000 (-0700) Subject: am a125c937: resolved conflicts for merge of 2c311be7 to honeycomb-plus-aosp X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/072955603b0377ecc22fecdfcae6acbde773c0c5?ds=sidebyside;hp=-c am a125c937: resolved conflicts for merge of 2c311be7 to honeycomb-plus-aosp * commit 'a125c937de06b1cc43368743592f47513eb88b76': Add generation of dependency file for .ap_ package --- 072955603b0377ecc22fecdfcae6acbde773c0c5 diff --combined Resource.cpp index 99e781d,1724c8c..1d97a4e --- a/Resource.cpp +++ b/Resource.cpp @@@ -2210,11 -2210,6 +2210,11 @@@ writeProguardForLayouts(ProguardKeepSet } } } + // Handle the overlays + sp overlay = assets->getOverlay(); + if (overlay.get()) { + return writeProguardForLayouts(keep, overlay); + } return NO_ERROR; } @@@ -2261,11 -2256,11 +2261,11 @@@ writeProguardFile(Bundle* bundle, cons return err; } - status_t - writeDependencyPreReqs(Bundle* bundle, const sp& 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& files, FILE* fp) { status_t deps = -1; - sp 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()); @@@ -2273,3 -2268,14 +2273,14 @@@ } return deps; } + + status_t + writeDependencyPreReqs(Bundle* bundle, const sp& assets, FILE* fp, bool includeRaw) + { + status_t deps = -1; + deps += writePathsToFile(assets->getFullResPaths(), fp); + if (includeRaw) { + deps += writePathsToFile(assets->getFullAssetPaths(), fp); + } + return deps; + }