Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df8c82d7 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Allow start of explicit intents

This change relaxes startActivity* logic to allow for all explicit
intents to be started, even if the package name provided for such intent
is not visible to the caller.

Fixes: 161007330
Bug: 148657387
Test: atest AppEnumerationTests
Change-Id: Iceaee276e8d4c297ace1fe605100f52e4cc49b07
parent c25a56ca
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -7161,7 +7161,8 @@ public class PackageManagerService extends IPackageManager.Stub
                        && ((!matchInstantApp && !isCallerInstantApp && isTargetInstantApp)
                                || (matchVisibleToInstantAppOnly && isCallerInstantApp
                                        && isTargetHiddenFromInstantApp));
                final boolean blockNormalResolution = !isTargetInstantApp && !isCallerInstantApp
                final boolean blockNormalResolution =
                        !resolveForStart && !isTargetInstantApp && !isCallerInstantApp
                                && shouldFilterApplicationLocked(
                                getPackageSettingInternal(ai.applicationInfo.packageName,
                                        Process.SYSTEM_UID), filterCallingUid, userId);
@@ -7255,8 +7256,8 @@ public class PackageManagerService extends IPackageManager.Stub
                final PackageSetting setting =
                        getPackageSettingInternal(pkgName, Process.SYSTEM_UID);
                result = null;
                if (setting != null && setting.pkg != null
                        && !shouldFilterApplicationLocked(setting, filterCallingUid, userId)) {
                if (setting != null && setting.pkg != null && (resolveForStart
                        || !shouldFilterApplicationLocked(setting, filterCallingUid, userId))) {
                    result = filterIfNotSystemUser(mComponentResolver.queryActivities(
                            intent, resolvedType, flags, setting.pkg.getActivities(), userId),
                            userId);