Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40358393 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Track libziparchive API change." am: 32581e1d am: 78791cd8" into qt-dev-plus-aosp

parents b9a5b1ce dfe3d688
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ jobject StrictJarFile_nativeFindEntry(JNIEnv* env, jobject, jlong nativeHandle,

  ZipEntry data;
  const int32_t error = FindEntry(reinterpret_cast<ZipArchiveHandle>(nativeHandle),
                                  ZipString(entryNameChars.c_str()), &data);
                                  entryNameChars.c_str(), &data);
  if (error) {
    return NULL;
  }
+2 −4
Original line number Diff line number Diff line
@@ -125,9 +125,8 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl(
  std::unique_ptr<ApkAssets> loaded_apk(new ApkAssets(unmanaged_handle, path, last_mod_time));

  // 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();
@@ -165,9 +164,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 {};
  }
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ ZipEntryRO ZipFileRO::findEntryByName(const char* entryName) const

    data->name = ZipString(entryName);

    const int32_t error = FindEntry(mHandle, data->name, &(data->entry));
    const int32_t error = FindEntry(mHandle, entryName, &(data->entry));
    if (error) {
        delete data;
        return NULL;
+1 −2
Original line number Diff line number Diff line
@@ -34,9 +34,8 @@ AssertionResult ReadFileFromZipToString(const std::string& zip_path, const std::
                              << "': " << ::ErrorCodeString(result);
  }

  ::ZipString name(file.c_str());
  ::ZipEntry entry;
  result = ::FindEntry(handle, name, &entry);
  result = ::FindEntry(handle, file.c_str(), &entry);
  if (result != 0) {
    ::CloseArchive(handle);
    return AssertionFailure() << "Could not find file '" << file << "' in zip '" << zip_path