]> git.saurik.com Git - android/aapt.git/blobdiff - Resource.cpp
resolved conflicts for merge of 2c311be7 to honeycomb-plus-aosp
[android/aapt.git] / Resource.cpp
index ae4bdc80c31459cc5985362e6d9f81cf28092fef..1724c8c99fc7e950b15842f8d016fb1612942637 100644 (file)
@@ -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;
+}