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

Commit 5ce8750f authored by Winson Chiu's avatar Winson Chiu Committed by Android (Google) Code Review
Browse files

Merge changes I60fdb050,Ia87bf657,If8229962 into sc-dev

* changes:
  Include current profile browsers when resolving cross profile
  Only allow forwarding of Intents that MATCH_DEFAULT_ONLY
  Use correct parentUserId when using cross profile domain verification
parents 9568bbdc d6598b5e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2655,13 +2655,10 @@ public class PackageManagerService extends IPackageManager.Stub
                // If no apps are approved for the domain, resolve only to browsers
                if (approvedInfos.isEmpty()) {
                    // If the other profile has a result, include that and delegate to
                    // ResolveActivity
                    includeBrowser = true;
                    if (xpDomainInfo != null && xpDomainInfo.highestApprovalLevel
                            > DomainVerificationManagerInternal.APPROVAL_LEVEL_NONE) {
                        result.add(xpDomainInfo.resolveInfo);
                    } else {
                        includeBrowser = true;
                    }
                } else {
                    result.addAll(approvedInfos);
@@ -2823,7 +2820,7 @@ public class PackageManagerService extends IPackageManager.Stub
                result.highestApprovalLevel = Math.max(mDomainVerificationManager
                        .approvalLevelForDomain(ps, intent, resultTargetUser, flags,
                                riTargetUser.targetUserId), result.highestApprovalLevel);
                                parentUserId), result.highestApprovalLevel);
            }
            if (result != null && result.highestApprovalLevel
                    <= DomainVerificationManagerInternal.APPROVAL_LEVEL_NONE) {
@@ -9992,6 +9989,7 @@ public class PackageManagerService extends IPackageManager.Stub
                        false /*includeInstantApps*/,
                        isImplicitImageCaptureIntentAndNotSetByDpcLocked(intent, parent.id,
                                resolvedType, 0));
                flags |= PackageManager.MATCH_DEFAULT_ONLY;
                CrossProfileDomainInfo xpDomainInfo = getCrossProfileDomainPreferredLpr(
                        intent, resolvedType, flags, sourceUserId, parent.id);
                return xpDomainInfo != null;