A separate entry for work profile CA cert
We mixed both primary and work profile CA certs into single entry previously which is not aligned with the CTS requirement. Separate them from now. Test: m -j RoboSettingsTest Test: Run related manual test in CtsVerifier Bug: 64567417 Change-Id: Iaff2d9f25ef15b96c11727e7075bdae8e90ec8ce
This commit is contained in:
@@ -200,20 +200,25 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfOwnerInstalledCaCertsForCurrentUserAndManagedProfile() {
|
||||
int num = 0;
|
||||
List<String> certs = mDpm.getOwnerInstalledCaCerts(new UserHandle(MY_USER_ID));
|
||||
if (certs != null) {
|
||||
num += certs.size();
|
||||
public int getNumberOfOwnerInstalledCaCertsForCurrentUser() {
|
||||
final List<String> certs = mDpm.getOwnerInstalledCaCerts(new UserHandle(MY_USER_ID));
|
||||
if (certs == null) {
|
||||
return 0;
|
||||
}
|
||||
return certs.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfOwnerInstalledCaCertsForManagedProfile() {
|
||||
final int userId = getManagedProfileUserId();
|
||||
if (userId != UserHandle.USER_NULL) {
|
||||
certs = mDpm.getOwnerInstalledCaCerts(new UserHandle(userId));
|
||||
if (certs != null) {
|
||||
num += certs.size();
|
||||
}
|
||||
if (userId == UserHandle.USER_NULL) {
|
||||
return 0;
|
||||
}
|
||||
return num;
|
||||
final List<String> certs = mDpm.getOwnerInstalledCaCerts(new UserHandle(userId));
|
||||
if (certs == null) {
|
||||
return 0;
|
||||
}
|
||||
return certs.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user