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

Commit 8e322efd authored by Baligh Uddin's avatar Baligh Uddin Committed by android-build-merger
Browse files

Merge "Fix the detection for compressed APKs." into oc-mr1-dev am: 8712ac10

am: 1f3d7274

Change-Id: I5166acf0637d70f0f601b39115fbf9c5083f9a0d
parents e2ba9ab0 1f3d7274
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -773,6 +773,14 @@ def ReadApkCerts(tf_zip):
  certmap = {}
  compressed_extension = None

  # META/apkcerts.txt contains the info for _all_ the packages known at build
  # time. Filter out the ones that are not installed.
  installed_files = set()
  for name in tf_zip.namelist():
    basename = os.path.basename(name)
    if basename:
      installed_files.add(basename)

  for line in tf_zip.read("META/apkcerts.txt").split("\n"):
    line = line.strip()
    if not line:
@@ -797,6 +805,10 @@ def ReadApkCerts(tf_zip):
      else:
        raise ValueError("failed to parse line from apkcerts.txt:\n" + line)
      if this_compressed_extension:
        # Only count the installed files.
        filename = name + '.' + this_compressed_extension
        if filename not in installed_files:
          continue
        # Make sure that all the values in the compression map have the same
        # extension. We don't support multiple compression methods in the same
        # system image.