diff options
Diffstat (limited to 'src/com/android/settings/SecuritySettings.java')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 7db4a4e..6977672 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -98,6 +98,7 @@ public class SecuritySettings extends SettingsPreferenceFragment private static final String KEY_VISIBLE_ERROR_PATTERN = "visible_error_pattern"; private static final String KEY_VISIBLE_DOTS = "visibledots"; private static final String KEY_SECURITY_CATEGORY = "security_category"; + private static final String KEY_ENCRYPTION_CATEGORY = "encryption_category"; private static final String KEY_DEVICE_ADMIN_CATEGORY = "device_admin_category"; private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout"; private static final String KEY_OWNER_INFO_SETTINGS = "owner_info_settings"; @@ -127,6 +128,7 @@ public class SecuritySettings extends SettingsPreferenceFragment private static final String KEY_GENERAL_CATEGORY = "general_category"; private static final String KEY_LIVE_LOCK_SCREEN = "live_lock_screen"; private static final String KEY_LOCK_SCREEN_BLUR = CMSettings.Secure.LOCK_SCREEN_BLUR_ENABLED; + private static final String KEY_REPLACE_ENCRYPTION_PASSWORD = "crypt_keeper_replace_password"; // These switch preferences need special handling since they're not all stored in Settings. private static final String SWITCH_PREFERENCE_KEYS[] = { KEY_LOCK_AFTER_TIMEOUT, @@ -300,6 +302,15 @@ public class SecuritySettings extends SettingsPreferenceFragment if (LockPatternUtils.isDeviceEncryptionEnabled()) { // The device is currently encrypted. addPreferencesFromResource(R.xml.security_settings_encrypted); + if (!mLockPatternUtils.isSeparateEncryptionPasswordEnabled()) { + PreferenceGroup encryptionCategory = + (PreferenceGroup) root.findPreference(KEY_ENCRYPTION_CATEGORY); + if (encryptionCategory != null) { + Preference replaceEncryptionPassword = + root.findPreference(KEY_REPLACE_ENCRYPTION_PASSWORD); + encryptionCategory.removePreference(replaceEncryptionPassword); + } + } } else { // This device supports encryption but isn't encrypted. addPreferencesFromResource(R.xml.security_settings_unencrypted); |