Commit 255d2f85 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[SuperSize] Fix --java-only flag requiring presence of .so files.

Previously, SuperSize still asserts that a given .apk file would have
a non-empty .so files, even if --java-only fiag is provided. This
causes error when running SuperSize on TrichromeWebView.apk. This CL
fixes the issue by skipping the check if --java-only is provided.

Change-Id: Iaa30b0c27668cd6fd7df8705209487a701f2b12c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2120964Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753315}
parent 577a9b01
......@@ -1788,7 +1788,7 @@ def _DeduceMainPaths(args, parser, extracted_minimal_apk_path=None):
apk_path = extracted_minimal_apk_path or args.apk_file
apk_so_path = None
if apk_path:
if apk_path and not args.java_only:
with zipfile.ZipFile(apk_path) as z:
lib_infos = [f for f in z.infolist()
if f.filename.endswith('.so') and f.file_size > 0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment