MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / processJarFile

Function processJarFile

tools/aapt/Package.cpp:666–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666ssize_t processJarFile(ZipFile* jar, ZipFile* out)
667{
668 status_t err;
669 size_t N = jar->getNumEntries();
670 size_t count = 0;
671 for (size_t i=0; i<N; i++) {
672 ZipEntry* entry = jar->getEntryByIndex(i);
673 const char* storageName = entry->getFileName();
674 if (endsWith(storageName, ".class")) {
675 int compressionMethod = entry->getCompressionMethod();
676 size_t size = entry->getUncompressedLen();
677 const void* data = jar->uncompress(entry);
678 if (data == NULL) {
679 fprintf(stderr, "ERROR: unable to uncompress entry '%s'\n",
680 storageName);
681 return -1;
682 }
683 out->add(data, size, storageName, compressionMethod, NULL);
684 free((void*)data);
685 }
686 count++;
687 }
688 return count;
689}
690
691ssize_t processJarFiles(Bundle* bundle, ZipFile* zip)
692{

Callers 1

processJarFilesFunction · 0.85

Calls 8

endsWithFunction · 0.85
getEntryByIndexMethod · 0.80
getUncompressedLenMethod · 0.80
uncompressMethod · 0.80
getFileNameMethod · 0.65
addMethod · 0.65
getNumEntriesMethod · 0.45
getCompressionMethodMethod · 0.45

Tested by

no test coverage detected