]> git.saurik.com Git - android/aapt.git/commitdiff
am 617262d8: Merge change I37c4157d into eclair
authorDoug Zongker <dougz@android.com>
Tue, 20 Oct 2009 20:36:06 +0000 (13:36 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Tue, 20 Oct 2009 20:36:06 +0000 (13:36 -0700)
Merge commit '617262d8f57362536ddc00a070c1c0994741de44' into eclair-plus-aosp

* commit '617262d8f57362536ddc00a070c1c0994741de44':
  add "junk path" -k option to aapt (DO NOT MERGE)

1  2 
Command.cpp

diff --combined Command.cpp
index 3019bd0f5e9e828dc8c68a961fcd9336044c8bdf,1a536d6a80853aa5315ec4baedf3a3faa96724ec..4067735dd165f3022891181176b380a06c9d3c5c
@@@ -401,7 -401,7 +401,7 @@@ int doDump(Bundle* bundle
              ResXMLTree tree;
              asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER);
              if (asset == NULL) {
 -                fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname);
 +                fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname);
                  goto bail;
              }
  
              ResXMLTree tree;
              asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER);
              if (asset == NULL) {
 -                fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname);
 +                fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname);
                  goto bail;
              }
  
                  printf("uses-feature:'android.hardware.camera'\n");
                  printf("uses-feature:'android.hardware.camera.autofocus'\n");
              }
-             
              if (hasMainActivity) {
                  printf("main\n");
              }
@@@ -997,8 -997,15 +997,15 @@@ int doAdd(Bundle* bundle
              printf(" '%s'... (from gzip)\n", fileName);
              result = zip->addGzip(fileName, String8(fileName).getBasePath().string(), NULL);
          } else {
-             printf(" '%s'...\n", fileName);
-             result = zip->add(fileName, bundle->getCompressionMethod(), NULL);
+             if (bundle->getJunkPath()) {
+                 String8 storageName = String8(fileName).getPathLeaf();
+                 printf(" '%s' as '%s'...\n", fileName, storageName.string());
+                 result = zip->add(fileName, storageName.string(),
+                                   bundle->getCompressionMethod(), NULL);
+             } else {
+                 printf(" '%s'...\n", fileName);
+                 result = zip->add(fileName, bundle->getCompressionMethod(), NULL);
+             }
          }
          if (result != NO_ERROR) {
              fprintf(stderr, "Unable to add '%s' to '%s'", bundle->getFileSpecEntry(i), zipFileName);