]> git.saurik.com Git - android/aapt.git/blobdiff - Images.cpp
frameworks/base: move Zip* from libandroidfw to libutils
[android/aapt.git] / Images.cpp
index 311ceea660c53fd1ca8fa7df8fe4a299c294e9aa..2b9b056776dcd460343c82ad5bc499c14e98887e 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "Images.h"
 
-#include <utils/ResourceTypes.h>
+#include <androidfw/ResourceTypes.h>
 #include <utils/ByteOrder.h>
 
 #include <png.h>
@@ -964,7 +964,7 @@ static void write_png(const char* imageName,
                  compression_type));
 }
 
-status_t preProcessImage(Bundle* bundle, const sp<AaptAssets>& assets,
+status_t preProcessImage(const Bundle* bundle, const sp<AaptAssets>& assets,
                          const sp<AaptFile>& file, String8* outNewLeafName)
 {
     String8 ext(file->getPath().getPathExtension());
@@ -980,6 +980,10 @@ status_t preProcessImage(Bundle* bundle, const sp<AaptAssets>& assets,
 
     String8 printableName(file->getPrintableSource());
 
+    if (bundle->getVerbose()) {
+        printf("Processing image: %s\n", printableName.string());
+    }
+
     png_structp read_ptr = NULL;
     png_infop read_info = NULL;
     FILE* fp;
@@ -1080,7 +1084,7 @@ bail:
     return error;
 }
 
-status_t preProcessImageToCache(Bundle* bundle, String8 source, String8 dest)
+status_t preProcessImageToCache(const Bundle* bundle, const String8& source, const String8& dest)
 {
     png_structp read_ptr = NULL;
     png_infop read_info = NULL;
@@ -1094,6 +1098,10 @@ status_t preProcessImageToCache(Bundle* bundle, String8 source, String8 dest)
 
     status_t error = UNKNOWN_ERROR;
 
+    if (bundle->getVerbose()) {
+        printf("Processing image to cache: %s => %s\n", source.string(), dest.string());
+    }
+
     // Get a file handler to read from
     fp = fopen(source.string(),"rb");
     if (fp == NULL) {