Merge "Update ziparchive usage to the new API."
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index a485d2b..5f6e831 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -50,8 +50,7 @@
     ZipEntryName name;
     void *cookie;
 
-    _ZipEntryRO() : cookie(NULL) {
-    }
+    _ZipEntryRO() : cookie(NULL) {}
 
     ~_ZipEntryRO() {
       EndIteration(cookie);
@@ -87,15 +86,15 @@
 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;
 }