DO NOT MERGE: Cross profile candidate should be considered
Bug: 32547783 Fixed the regression introduced in8e2d9d1d90Test: Manual test - Open a map link in work calendar, personal map is shown as an option. Change-Id: If5651b5e09cf1916813e8f91dbdcdf53f9119ef2 (cherry picked from commit9f2c93663c)
This commit is contained in:
@@ -5398,16 +5398,24 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
result.remove(xpResolveInfo);
|
result.remove(xpResolveInfo);
|
||||||
}
|
}
|
||||||
if (result.size() == 0 && !addEphemeral) {
|
if (result.size() == 0 && !addEphemeral) {
|
||||||
|
// No result in current profile, but found candidate in parent user.
|
||||||
|
// And we are not going to add emphemeral app, so we can return the
|
||||||
|
// result straight away.
|
||||||
result.add(xpDomainInfo.resolveInfo);
|
result.add(xpDomainInfo.resolveInfo);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
} else if (result.size() <= 1 && !addEphemeral) {
|
||||||
|
// No result in parent user and <= 1 result in current profile, and we
|
||||||
|
// are not going to add emphemeral app, so we can return the result without
|
||||||
|
// further processing.
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
if (result.size() > 1 || addEphemeral) {
|
// We have more than one candidate (combining results from current and parent
|
||||||
|
// profile), so we need filtering and sorting.
|
||||||
result = filterCandidatesWithDomainPreferredActivitiesLPr(
|
result = filterCandidatesWithDomainPreferredActivitiesLPr(
|
||||||
intent, flags, result, xpDomainInfo, userId);
|
intent, flags, result, xpDomainInfo, userId);
|
||||||
sortResult = true;
|
sortResult = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
final PackageParser.Package pkg = mPackages.get(pkgName);
|
final PackageParser.Package pkg = mPackages.get(pkgName);
|
||||||
if (pkg != null) {
|
if (pkg != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user