OSDN Git Service

Reimplement ZipFileRO in terms of libziparchive.
authorNarayan Kamath <narayan@google.com>
Tue, 3 Dec 2013 13:16:03 +0000 (13:16 +0000)
committerNarayan Kamath <narayan@google.com>
Mon, 9 Dec 2013 16:34:30 +0000 (16:34 +0000)
commitaae73e748c81bd500e288753864ed5e0abfdd526
tree77185acf13f03803ecaaa9fd799e1a0d8cda1a3f
parentd837548947abf5018d05f4cb17fe31cab41ea3c3
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
include/androidfw/ZipFileRO.h
include/androidfw/ZipUtils.h
libs/androidfw/Android.mk
libs/androidfw/Asset.cpp
libs/androidfw/AssetManager.cpp
libs/androidfw/ZipFileRO.cpp
libs/androidfw/ZipUtils.cpp
libs/androidfw/tests/Android.mk
libs/androidfw/tests/ZipUtils_test.cpp [moved from libs/androidfw/tests/ZipFileRO_test.cpp with 87% similarity]