[Android WebAPK Refactor] Make WebAPK validity logic in WebappLauncherActivity more correct 10/X
A WebAPK is valid if all the requirements below are true: Requirement#1: The APK is correctly signed (WebApkValidator#isValidWebApk()) Requirement#2: The APK handles the URL in the intent (WebApkValidator#canWebApkHandleUrl()) Requirement#3: The APK has <meta-data> in a format that Chrome can read. (WebApkInfo#create() returns non-null) This CL changes the logic in WebappLauncherActivity to make Requirement#3 clearer. This CL: - Introduces WebappInfo#isForWebApk() and makes WebappLauncherActivity use this instead of the return value of WebappLauncherActivity#isValidWebApk() which did not check Requirement #3. - Changes WebApkValidator#canWebApkHandleUrl() to no longer check whether the passed in APK package is a valid WebAPK. This reduces the number of extras read directly in WebappLauncherActivity (outside of WebApkInfo#create/WebappInfo#create) BUG=901954 Change-Id: I51ef612c641d9d7c2e9535db33f0baee17694edb Reviewed-on: https://chromium-review.googlesource.com/c/1351456 Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by:Dominick Ng <dominickn@chromium.org> Cr-Commit-Position: refs/heads/master@{#611346}
Showing
Please register or sign in to comment