summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkAssets.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-05-03 22:42:31 -0700
committerElliott Hughes <enh@google.com>2019-05-03 22:42:31 -0700
commitb97e737c181d9dec996df6d6d7777b66a1aea946 (patch)
tree10169f13e5ce4956e8cf0ff1bb549f7b26f1e4af /libs/androidfw/ApkAssets.cpp
parent5333210feffe4d5b829692a3ae68de02022e2334 (diff)
Track libziparchive API change.
Bug: http://b/129068177 Test: treehugger Change-Id: I88f49a06db416a7c6ec8afe87cc9cca825eb5ccb
Diffstat (limited to 'libs/androidfw/ApkAssets.cpp')
-rw-r--r--libs/androidfw/ApkAssets.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp
index 66a547723b2f..47b7d646d79f 100644
--- a/libs/androidfw/ApkAssets.cpp
+++ b/libs/androidfw/ApkAssets.cpp
@@ -120,9 +120,8 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl(
std::unique_ptr<ApkAssets> loaded_apk(new ApkAssets(unmanaged_handle, path));
// Find the resource table.
- ::ZipString entry_name(kResourcesArsc.c_str());
::ZipEntry entry;
- result = ::FindEntry(loaded_apk->zip_handle_.get(), entry_name, &entry);
+ result = ::FindEntry(loaded_apk->zip_handle_.get(), kResourcesArsc, &entry);
if (result != 0) {
// There is no resources.arsc, so create an empty LoadedArsc and return.
loaded_apk->loaded_arsc_ = LoadedArsc::CreateEmpty();
@@ -160,9 +159,8 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl(
std::unique_ptr<Asset> ApkAssets::Open(const std::string& path, Asset::AccessMode mode) const {
CHECK(zip_handle_ != nullptr);
- ::ZipString name(path.c_str());
::ZipEntry entry;
- int32_t result = ::FindEntry(zip_handle_.get(), name, &entry);
+ int32_t result = ::FindEntry(zip_handle_.get(), path, &entry);
if (result != 0) {
return {};
}