diff options
| author | 2009-10-13 16:41:21 -0400 | |
|---|---|---|
| committer | 2009-10-13 16:41:21 -0400 | |
| commit | afbf8afa858a78b66c19f11cfda030e913b34085 (patch) | |
| tree | ca31311b647e81b597e4792f86de8c796b71bf49 /tools/aapt/Command.cpp | |
| parent | b10036b39003b6961c57f87f65236c1d5d0d1e52 (diff) | |
| parent | dbe7a68cc13ae135b33769918932838d2d447169 (diff) | |
Merge change I564b5b00 into eclair-mr2
* changes:
add "junk path" -k option to aapt
Diffstat (limited to 'tools/aapt/Command.cpp')
| -rw-r--r-- | tools/aapt/Command.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 47423418e8b2..1a536d6a8085 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -848,7 +848,7 @@ int doDump(Bundle* bundle) printf("uses-feature:'android.hardware.camera'\n"); printf("uses-feature:'android.hardware.camera.autofocus'\n"); } - + if (hasMainActivity) { printf("main\n"); } @@ -997,8 +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); |