Ensure trust agents are only provided by platform packages

Ensures that Settings only shows TrustAgentServices from
platform packages.

Bug: 15287044
Change-Id: I62c131d99c7266f8617ec32a50a4f5549a07b4b7
This commit is contained in:
Adrian Roos
2014-06-04 15:53:14 +02:00
parent 820848a038
commit da11363812
3 changed files with 20 additions and 0 deletions

View File

@@ -317,6 +317,7 @@ public class SecuritySettings extends RestrictedSettingsFragment
PackageManager.GET_META_DATA);
for (ResolveInfo resolveInfo : resolveInfos) {
if (resolveInfo.serviceInfo == null) continue;
if (!TrustAgentUtils.checkProvidePermission(resolveInfo, pm)) continue;
TrustAgentUtils.TrustAgentComponentInfo trustAgentComponentInfo =
TrustAgentUtils.getSettingsComponent(pm, resolveInfo);
if (trustAgentComponentInfo.componentName == null ||