diff options
author | Hai Zhang <zhanghai@google.com> | 2019-07-19 14:00:25 -0700 |
---|---|---|
committer | Hai Zhang <zhanghai@google.com> | 2019-07-23 23:16:10 +0000 |
commit | e237eb894927ccbe0bf1a15421a03b998c42d591 (patch) | |
tree | bb8438b83f6f65e5788164e5ef513e105ec9d480 | |
parent | 7bb22d54dd254e13506d116fecaecfa878126678 (diff) | |
download | android_packages_apps_PackageInstaller-e237eb894927ccbe0bf1a15421a03b998c42d591.tar.gz android_packages_apps_PackageInstaller-e237eb894927ccbe0bf1a15421a03b998c42d591.tar.bz2 android_packages_apps_PackageInstaller-e237eb894927ccbe0bf1a15421a03b998c42d591.zip |
Fix filtering for browser apps.
Despite what the javadoc on PackageManager.MATCH_ALL says, it actually
still performs all kinds of filtering and only affects whether to
return only the default browser for browser intent. So no need for
extra filtering on the result.
The previous filtering based upon ActivityInfo.enabled and
ApplicationInfo.enabled is incorrect because they only reflect the
state declared in manifest, not the actual state.
Fixes: 137731581
Test: presubmit
Change-Id: I61a1dcd572d2ada01ec96c9399be38f66ad88bbb
-rw-r--r-- | src/com/android/packageinstaller/role/model/BrowserRoleBehavior.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/packageinstaller/role/model/BrowserRoleBehavior.java b/src/com/android/packageinstaller/role/model/BrowserRoleBehavior.java index 56c7b7af..1534081f 100644 --- a/src/com/android/packageinstaller/role/model/BrowserRoleBehavior.java +++ b/src/com/android/packageinstaller/role/model/BrowserRoleBehavior.java @@ -105,9 +105,7 @@ public class BrowserRoleBehavior implements RoleBehavior { for (int i = 0; i < resolveInfosSize; i++) { ResolveInfo resolveInfo = resolveInfos.get(i); - if (!resolveInfo.handleAllWebDataURI || !resolveInfo.activityInfo.enabled - || !resolveInfo.activityInfo.applicationInfo.enabled - || resolveInfo.activityInfo.applicationInfo.isInstantApp()) { + if (!resolveInfo.handleAllWebDataURI) { continue; } packageNames.add(resolveInfo.activityInfo.packageName); |