Don't require BROWSABLE

Initially we wanted to limit instant apps to VIEW/BROWSABLE
intents, but, apparently apps don't always set the BROWSABLE
category. So, allow any VIEW intent w/ a URL to resovle to
an instant app.

Change-Id: I96e25cca8abcbe89b4a227b707112184c19565c6
Fixes: 38146110
Test: Manual
Test: open go/aia-test-links
Test: click any link
Test: notice it launches the instant app directly [instead of going through the installer]
This commit is contained in:
Todd Kennedy
2017-05-09 09:43:23 -07:00
parent 7cf5f74f3f
commit 303c786927
2 changed files with 0 additions and 2 deletions

View File

@@ -637,7 +637,6 @@ class ActivityStarter {
if (componentSpecified
&& intent.getData() != null
&& Intent.ACTION_VIEW.equals(intent.getAction())
&& intent.hasCategory(Intent.CATEGORY_BROWSABLE)
&& mService.getPackageManagerInternalLocked()
.isInstantAppInstallerComponent(intent.getComponent())) {
// intercept intents targeted directly to the ephemeral installer the

View File

@@ -4218,7 +4218,6 @@ public class PackageManagerService extends IPackageManager.Stub
final boolean allowMatchInstant =
(includeInstantApps
&& Intent.ACTION_VIEW.equals(intent.getAction())
&& intent.hasCategory(Intent.CATEGORY_BROWSABLE)
&& hasWebURI(intent))
|| isSpecialProcess
|| mContext.checkCallingOrSelfPermission(