Track libziparchive API change.
Bug: http://b/129068177
Test: treehugger
Change-Id: Id4b202502b07e08102deda49f7d28ba10a63bb0a
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp
index 47b7d64..7ba7828 100644
--- a/libs/androidfw/ApkAssets.cpp
+++ b/libs/androidfw/ApkAssets.cpp
@@ -206,9 +206,8 @@
root_path_full += '/';
}
- ::ZipString prefix(root_path_full.c_str());
void* cookie;
- if (::StartIteration(zip_handle_.get(), &cookie, &prefix, nullptr) != 0) {
+ if (::StartIteration(zip_handle_.get(), &cookie, root_path_full, "") != 0) {
return false;
}
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index 44614c1..ee5f778 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -149,11 +149,8 @@
bool ZipFileRO::startIteration(void** cookie, const char* prefix, const char* suffix)
{
_ZipEntryRO* ze = new _ZipEntryRO;
- ZipString pe(prefix ? prefix : "");
- ZipString se(suffix ? suffix : "");
int32_t error = StartIteration(mHandle, &(ze->cookie),
- prefix ? &pe : NULL,
- suffix ? &se : NULL);
+ prefix ? prefix : "", suffix ? suffix : "");
if (error) {
ALOGW("Could not start iteration over %s: %s", mFileName != NULL ? mFileName : "<null>",
ErrorCodeString(error));