Only allow BROWSABLE && DEFAULT Intents to be always opened
Auto verification of app links requires that an intent filter declare
action=VIEW, scheme=HTTP(S), category=BROWSABLE. However,
PackageManagerService was not taking that into account, missing the
But the app info Settings UI did take category into account, so it was
possible for a user to set an application to automatically open web URIs
without understanding that this also granted domains that were not
visible in the app info UI.
To resolve both this, this change makes it so that both auto
verification and the Settings state can only consider the app as
"always" open only if the Intent contains both BROWSABLE and DEFAULT.
Test: manual, see bug for reproduction steps
(cherry picked from commit 4266f938c6705466d3844385c2031d1e80ee7b2d)
(cherry picked from commit 0f337fcea8de957ac2939f602461913283ecabce)
1 file changed