summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SecuritySettings.java
diff options
context:
space:
mode:
authorEmily Bernier <ember@google.com>2013-04-11 16:24:56 -0400
committerEmily Bernier <ember@google.com>2013-04-11 19:54:57 -0400
commit11bd33a564d4ae9a48195ad11dbbd09d80e59b55 (patch)
tree03a0d8fd1c6804b2837a5d339801b3feaccf1b93 /src/com/android/settings/SecuritySettings.java
parent3c3fa0ccb8bf9f62558202e909cc158a2e673e37 (diff)
downloadpackages_apps_Settings-11bd33a564d4ae9a48195ad11dbbd09d80e59b55.tar.gz
packages_apps_Settings-11bd33a564d4ae9a48195ad11dbbd09d80e59b55.tar.bz2
packages_apps_Settings-11bd33a564d4ae9a48195ad11dbbd09d80e59b55.zip
User restrictions for creds storage & user removal
Change-Id: I423e729f73ece6209875d2f8d194d0d11c975c20
Diffstat (limited to 'src/com/android/settings/SecuritySettings.java')
-rw-r--r--src/com/android/settings/SecuritySettings.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 556f5484d..c2ddb5ff8 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -235,15 +235,20 @@ public class SecuritySettings extends SettingsPreferenceFragment
mShowPassword = (CheckBoxPreference) root.findPreference(KEY_SHOW_PASSWORD);
// Credential storage
- mKeyStore = KeyStore.getInstance();
- Preference credentialStorageType = root.findPreference(KEY_CREDENTIAL_STORAGE_TYPE);
+ final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
+ if (!um.hasUserRestriction(UserManager.DISALLOW_CONFIG_CREDENTIALS)) {
+ mKeyStore = KeyStore.getInstance();
+ Preference credentialStorageType = root.findPreference(KEY_CREDENTIAL_STORAGE_TYPE);
- final int storageSummaryRes =
+ final int storageSummaryRes =
mKeyStore.isHardwareBacked() ? R.string.credential_storage_type_hardware
: R.string.credential_storage_type_software;
- credentialStorageType.setSummary(storageSummaryRes);
+ credentialStorageType.setSummary(storageSummaryRes);
- mResetCredentials = root.findPreference(KEY_RESET_CREDENTIALS);
+ mResetCredentials = root.findPreference(KEY_RESET_CREDENTIALS);
+ } else {
+ removePreference(KEY_CREDENTIALS_MANAGER);
+ }
// Application install
PreferenceGroup deviceAdminCategory= (PreferenceGroup)
@@ -252,7 +257,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
KEY_TOGGLE_INSTALL_APPLICATIONS);
mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());
- final UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
boolean isSideloadingAllowed =
!um.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES);
// Side loading of apps.