Merge "Filter activity starts that target package name" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-15 21:02:13 +00:00
committed by Android (Google) Code Review

View File

@@ -7210,11 +7210,14 @@ public class PackageManagerService extends IPackageManager.Stub
sortResult = true;
}
} else {
final AndroidPackage pkg = mPackages.get(pkgName);
final PackageSetting setting =
getPackageSettingInternal(pkgName, Process.SYSTEM_UID);
result = null;
if (pkg != null) {
if (setting != null && setting.pkg != null
&& !shouldFilterApplicationLocked(setting, filterCallingUid, userId)) {
result = filterIfNotSystemUser(mComponentResolver.queryActivities(
intent, resolvedType, flags, pkg.getActivities(), userId), userId);
intent, resolvedType, flags, setting.pkg.getActivities(), userId),
userId);
}
if (result == null || result.size() == 0) {
// the caller wants to resolve for a particular package; however, there