summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2013-01-15 14:50:37 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-01-15 14:50:37 -0800
commitc71c678e9b6a4278337b69f2c60c0fbe9988bf93 (patch)
treef3bbf4e077314b0bf611a2a94ea586c559d4c4cd /tools
parentf37d9c07b258ceeea991801f9223ecf071debd08 (diff)
parenta4e10cc746caea514216f436e2065b3bbefb25ef (diff)
downloadframeworks_base-c71c678e9b6a4278337b69f2c60c0fbe9988bf93.zip
frameworks_base-c71c678e9b6a4278337b69f2c60c0fbe9988bf93.tar.gz
frameworks_base-c71c678e9b6a4278337b69f2c60c0fbe9988bf93.tar.bz2
am a4e10cc7: am 6080cc5f: resolved conflicts for merge of dd52dfed to jb-mr1.1-ub-dev
* commit 'a4e10cc746caea514216f436e2065b3bbefb25ef': Fix the single crunch command to return the right error code.
Diffstat (limited to 'tools')
-rw-r--r--tools/aapt/Command.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 0a5e590..08d6554 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -1839,6 +1839,25 @@ int doCrunch(Bundle* bundle)
return NO_ERROR;
}
+/*
+ * Do PNG Crunching on a single flag
+ * -i points to a single png file
+ * -o points to a single png output file
+ */
+int doSingleCrunch(Bundle* bundle)
+{
+ fprintf(stdout, "Crunching single PNG file: %s\n", bundle->getSingleCrunchInputFile());
+ fprintf(stdout, "\tOutput file: %s\n", bundle->getSingleCrunchOutputFile());
+
+ String8 input(bundle->getSingleCrunchInputFile());
+ String8 output(bundle->getSingleCrunchOutputFile());
+ if (preProcessImageToCache(bundle, input, output) != NO_ERROR) {
+ // we can't return the status_t as it gets truncate to the lower 8 bits.
+ return 42;
+ }
+ return NO_ERROR;
+}
+
char CONSOLE_DATA[2925] = {
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 95, 46, 32, 32, 32, 32, 32, 32, 32, 32, 32,