summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkAssets.cpp
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2019-06-14 15:28:38 -0700
committer Elliott Hughes <enh@google.com> 2019-06-17 16:05:19 -0700
commita65cae9e7f47905ee1f55c2fa142eaff1109fc8b (patch)
tree98b23ce65e764039867096426d4052ee21874a66 /libs/androidfw/ApkAssets.cpp
parentf4c10e8bc26699a7e8efaebfd0d617aca9cb7718 (diff)
Move off ZipString and over to std::string/std::string_view as appropriate.
(Cherrypick to AOSP master, resolving merge conflicts.) Bug: http://b/129068177 Test: treehugger Change-Id: Ib46761d89772d3a3c655a39df573fd305c117d19 Merged-In: Ib46761d89772d3a3c655a39df573fd305c117d19
Diffstat (limited to 'libs/androidfw/ApkAssets.cpp')
-rw-r--r--libs/androidfw/ApkAssets.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp
index 7ba7828d71c4..5a8579a275df 100644
--- a/libs/androidfw/ApkAssets.cpp
+++ b/libs/androidfw/ApkAssets.cpp
@@ -211,7 +211,7 @@ bool ApkAssets::ForEachFile(const std::string& root_path,
return false;
}
- ::ZipString name;
+ std::string name;
::ZipEntry entry;
// We need to hold back directories because many paths will contain them and we want to only
@@ -220,7 +220,7 @@ bool ApkAssets::ForEachFile(const std::string& root_path,
int32_t result;
while ((result = ::Next(cookie, &entry, &name)) == 0) {
- StringPiece full_file_path(reinterpret_cast<const char*>(name.name), name.name_length);
+ StringPiece full_file_path(name);
StringPiece leaf_file_path = full_file_path.substr(root_path_full.size());
if (!leaf_file_path.empty()) {