[go: nahoru, domu]

[WebApk] Fix broken launch when matching an app with verified intent filters.

The issue was that WebappLauncherActivity queries package manager to see
if "a valid webapk can handle this url" and that "the webapk's package
matches the webapk package I'm going to load". The problem is when a
WebApk's intent scope collides with a native app that has a verified
intent filter, the first part of the query only returns the native app's
package.

This is fixed by forcing intent resolution with the WebApk package name
of the WebApk for which we're trying to render a page and then still
checking that the WebApk is valid.

Note: we still fully respect verified intent filters and does nothing
to change intent dispatch when clicking on a link that could match a
native app with verified intent filters. This simply means that if the
WebApk is launched it'll work and changing intent dispatch is a separate
product question.

BUG=738262

Review-Url: https://codereview.chromium.org/2968623002
Cr-Commit-Position: refs/heads/master@{#483744}
3 files changed