summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Piotr Jastrzebski <haaawk@google.com> 2014-08-18 08:27:56 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-08-16 05:59:09 +0000
commit8a28e16cd346bf28d00d8d5935ed092ffb59e5c9 (patch)
treed72f9a71a9d5e0cac3b095d05a12c558378066e6
parent7c8318c0e85540739afba3e8c0f922176bc299cd (diff)
parente2134a4b5dafc37f2de7e9b4190819f24aac207c (diff)
Merge "Update ziparchive usage to the new API."
-rw-r--r--libs/androidfw/ZipFileRO.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index a485d2bf59d2..5f6e831a0200 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -50,8 +50,7 @@ public:
ZipEntryName name;
void *cookie;
- _ZipEntryRO() : cookie(NULL) {
- }
+ _ZipEntryRO() : cookie(NULL) {}
~_ZipEntryRO() {
EndIteration(cookie);
@@ -87,15 +86,15 @@ ZipFileRO::~ZipFileRO() {
ZipEntryRO ZipFileRO::findEntryByName(const char* entryName) const
{
_ZipEntryRO* data = new _ZipEntryRO;
- const int32_t error = FindEntry(mHandle, entryName, &(data->entry));
+
+ data->name = ZipEntryName(entryName);
+
+ const int32_t error = FindEntry(mHandle, data->name, &(data->entry));
if (error) {
delete data;
return NULL;
}
- data->name.name = entryName;
- data->name.name_length = strlen(entryName);
-
return (ZipEntryRO) data;
}