}
}
}
+ // Handle the overlays
+ sp<AaptAssets> overlay = assets->getOverlay();
+ if (overlay.get()) {
+ return writeProguardForLayouts(keep, overlay);
+ }
return NO_ERROR;
}
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());
}
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;
+ }