summaryrefslogtreecommitdiff
path: root/libs/androidfw/Asset.cpp
diff options
context:
space:
mode:
author Narayan Kamath <narayan@google.com> 2013-12-03 13:16:03 +0000
committer Adam Lesinski <adamlesinski@google.com> 2014-01-27 10:31:11 -0800
commit560566d2915c03bed338fc532ac7f7aa3620cfdf (patch)
tree05c38c1fdcea2989eab2ff6e2934afa4f1f09326 /libs/androidfw/Asset.cpp
parente1aa223657dd1def8609b377afa86a024bfd4e14 (diff)
Reimplement ZipFileRO in terms of libziparchive.
This lets us share zip archive processing code with both the runtime (Art, dalvik) and critical java code (StrictJarFile). This change also moves several utility methods to ZipUtils and dedups code across several zip inflation methods. One of the side effects of this change is that several processing loops are now O(n) instead of O(n^2). bug: 10193060 (cherry picked from commit afd31e08299008fdc5c2813f21b2573f29dc53df) Change-Id: Iae67e62f1dc6dfc3f43e29bc38e3ffd1cb14d191
Diffstat (limited to 'libs/androidfw/Asset.cpp')
-rw-r--r--libs/androidfw/Asset.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp
index cb7628d1d5b1..ce6cc38b8357 100644
--- a/libs/androidfw/Asset.cpp
+++ b/libs/androidfw/Asset.cpp
@@ -843,7 +843,7 @@ void _CompressedAsset::close(void)
* The first time this is called, we expand the compressed data into a
* buffer.
*/
-const void* _CompressedAsset::getBuffer(bool wordAligned)
+const void* _CompressedAsset::getBuffer(bool)
{
unsigned char* buf = NULL;
@@ -860,7 +860,7 @@ const void* _CompressedAsset::getBuffer(bool wordAligned)
}
if (mMap != NULL) {
- if (!ZipFileRO::inflateBuffer(buf, mMap->getDataPtr(),
+ if (!ZipUtils::inflateToBuffer(mMap->getDataPtr(), buf,
mUncompressedLen, mCompressedLen))
goto bail;
} else {