Move one last caller off ZipString.
(I haven't switched this to std::string because the code's already been
removed internally, so there's no point.)
Bug: http://b/129068177
Test: treehugger
Change-Id: I5675d65b2f74f06e68a9de570741a88ed1899eca
Merged-In: I723570315285d7c2caadffd71cd2d15efde11819
diff --git a/media/libstagefright/MediaExtractorFactory.cpp b/media/libstagefright/MediaExtractorFactory.cpp
index 3597a4d..bb01b19 100644
--- a/media/libstagefright/MediaExtractorFactory.cpp
+++ b/media/libstagefright/MediaExtractorFactory.cpp
@@ -227,10 +227,9 @@
ret = StartIteration(zipHandle, &cookie, prefix8.c_str(), "extractor.so");
if (ret == 0) {
ZipEntry entry;
- ZipString name;
+ std::string_view name;
while (Next(cookie, &entry, &name) == 0) {
- String8 libPath = String8(apkPath) + "!/" +
- String8(reinterpret_cast<const char*>(name.name), name.name_length);
+ String8 libPath = String8(apkPath) + "!/" + String8(name.data(), name.size());
// TODO: Open with a linker namespace so that it can be linked with sub-libraries
// within the apk instead of system libraries already loaded.
void *libHandle = dlopen(libPath.string(), RTLD_NOW | RTLD_LOCAL);