Add CA certs Privacy Settings page

This CL adds information about CA certs installed by Device Owner and/or
Profile Owners to the Enterprise Privacy Setting page.

Test: make RunSettingsRoboTests
Bug: 32692748

Change-Id: I67bbe5af2b5b6326e4cd7224d0c6f17ab256dace
This commit is contained in:
Bartosz Fabianowski
2017-03-06 18:42:25 +01:00
parent fdb307bfc0
commit 732d695985
13 changed files with 445 additions and 5 deletions

View File

@@ -178,6 +178,22 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
}
}
@Override
public int getNumberOfOwnerInstalledCaCertsInCurrentUser() {
final List<String> certs = mDpm.getOwnerInstalledCaCerts(new UserHandle(MY_USER_ID));
return certs != null ? certs.size() : 0;
}
@Override
public int getNumberOfOwnerInstalledCaCertsInManagedProfile() {
final int userId = getManagedProfileUserId();
if (userId == UserHandle.USER_NULL) {
return 0;
}
final List<String> certs = mDpm.getOwnerInstalledCaCerts(new UserHandle(userId));
return certs != null ? certs.size() : 0;
}
protected static class EnterprisePrivacySpan extends ClickableSpan {
private final Context mContext;