Update strings and layout for enterprise privacy
This CL continues the finalization of UI layout and strings for the enterprise privacy page: * Turn footer into a header * Update strings * Dynamically generate summaries for entry points in security page Bug: 32692748 Test: m RunSettingsRoboTests Change-Id: Ibf248ac269380fb1b919b01f88f721130060b7f9
This commit is contained in:
@@ -83,6 +83,16 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
|
||||
return hasDeviceOwner() && getManagedProfileUserId() != UserHandle.USER_NULL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDeviceOwnerOrganizationName() {
|
||||
final CharSequence organizationName = mDpm.getDeviceOwnerOrganizationName();
|
||||
if (organizationName == null) {
|
||||
return null;
|
||||
} else {
|
||||
return organizationName.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getDeviceOwnerDisclosure() {
|
||||
if (!hasDeviceOwner()) {
|
||||
@@ -194,6 +204,19 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
|
||||
return certs != null ? certs.size() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile() {
|
||||
int activeAdmins = 0;
|
||||
for (final UserInfo userInfo : mUm.getProfiles(MY_USER_ID)) {
|
||||
final List<ComponentName> activeAdminsForUser
|
||||
= mDpm.getActiveAdminsAsUser(userInfo.id);
|
||||
if (activeAdminsForUser != null) {
|
||||
activeAdmins += activeAdminsForUser.size();
|
||||
}
|
||||
}
|
||||
return activeAdmins;
|
||||
}
|
||||
|
||||
protected static class EnterprisePrivacySpan extends ClickableSpan {
|
||||
private final Context mContext;
|
||||
|
||||
|
Reference in New Issue
Block a user