]> git.saurik.com Git - android/aapt.git/commitdiff
am a125c937: resolved conflicts for merge of 2c311be7 to honeycomb-plus-aosp
authorXavier Ducrohet <xav@android.com>
Thu, 21 Jul 2011 00:18:04 +0000 (17:18 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Thu, 21 Jul 2011 00:18:04 +0000 (17:18 -0700)
* commit 'a125c937de06b1cc43368743592f47513eb88b76':
  Add generation of dependency file for .ap_ package

1  2 
Resource.cpp

diff --combined Resource.cpp
index 99e781dc5a52feba2d9a9833a3c7fd0cfb3cb52a,1724c8c99fc7e950b15842f8d016fb1612942637..1d97a4e15c21f40ed0787d5e6cfa8196477775d7
@@@ -2210,11 -2210,6 +2210,11 @@@ writeProguardForLayouts(ProguardKeepSet
              }
          }
      }
 +    // Handle the overlays
 +    sp<AaptAssets> 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<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;
+ }