Merge "Track libziparchive API change."
am: 71e79a2396
Change-Id: Ia408edd9d3c0ad497dabccf11073886bb9edf8df
This commit is contained in:
@@ -100,16 +100,8 @@ jlong StrictJarFile_nativeStartIteration(JNIEnv* env, jobject, jlong nativeHandl
|
|||||||
}
|
}
|
||||||
|
|
||||||
IterationHandle* handle = new IterationHandle();
|
IterationHandle* handle = new IterationHandle();
|
||||||
int32_t error = 0;
|
int32_t error = StartIteration(reinterpret_cast<ZipArchiveHandle>(nativeHandle),
|
||||||
if (prefixChars.size() == 0) {
|
handle->CookieAddress(), prefixChars.c_str(), "");
|
||||||
error = StartIteration(reinterpret_cast<ZipArchiveHandle>(nativeHandle),
|
|
||||||
handle->CookieAddress(), NULL, NULL);
|
|
||||||
} else {
|
|
||||||
ZipString entry_name(prefixChars.c_str());
|
|
||||||
error = StartIteration(reinterpret_cast<ZipArchiveHandle>(nativeHandle),
|
|
||||||
handle->CookieAddress(), &entry_name, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
throwIoException(env, error);
|
throwIoException(env, error);
|
||||||
return static_cast<jlong>(-1);
|
return static_cast<jlong>(-1);
|
||||||
|
|||||||
@@ -206,9 +206,8 @@ bool ApkAssets::ForEachFile(const std::string& root_path,
|
|||||||
root_path_full += '/';
|
root_path_full += '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
::ZipString prefix(root_path_full.c_str());
|
|
||||||
void* cookie;
|
void* cookie;
|
||||||
if (::StartIteration(zip_handle_.get(), &cookie, &prefix, nullptr) != 0) {
|
if (::StartIteration(zip_handle_.get(), &cookie, root_path_full, "") != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,11 +149,8 @@ bool ZipFileRO::startIteration(void** cookie) {
|
|||||||
bool ZipFileRO::startIteration(void** cookie, const char* prefix, const char* suffix)
|
bool ZipFileRO::startIteration(void** cookie, const char* prefix, const char* suffix)
|
||||||
{
|
{
|
||||||
_ZipEntryRO* ze = new _ZipEntryRO;
|
_ZipEntryRO* ze = new _ZipEntryRO;
|
||||||
ZipString pe(prefix ? prefix : "");
|
|
||||||
ZipString se(suffix ? suffix : "");
|
|
||||||
int32_t error = StartIteration(mHandle, &(ze->cookie),
|
int32_t error = StartIteration(mHandle, &(ze->cookie),
|
||||||
prefix ? &pe : NULL,
|
prefix ? prefix : "", suffix ? suffix : "");
|
||||||
suffix ? &se : NULL);
|
|
||||||
if (error) {
|
if (error) {
|
||||||
ALOGW("Could not start iteration over %s: %s", mFileName != NULL ? mFileName : "<null>",
|
ALOGW("Could not start iteration over %s: %s", mFileName != NULL ? mFileName : "<null>",
|
||||||
ErrorCodeString(error));
|
ErrorCodeString(error));
|
||||||
|
|||||||
Reference in New Issue
Block a user