From 64dc746a68fcc812d5503769fbab29ffafd6ecac Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 11 Jan 2022 17:01:22 -0800 Subject: [PATCH] Rename crypt_keeper_* strings that are still used Some strings used in the Settings UI have "crypt_keeper" in their names, but they aren't specific to FDE, which is no longer supported. They are still used to report the encrypted status of the device on devices that use FBE, or the unencrypted status of the device on devices that don't have encryption enabled at all. Rename these strings appropriately. Test: On Cuttlefish with and without encryption enabled, tested visiting the "Encryption & credentials" settings. Bug: 208476087 Change-Id: Ic63910c870837f5b37e4407ba5b3c7629e925c17 (cherry picked from commit 6552bdd0ef352dc467af4a6f76aa7f1a2b9b6d50) Merged-In: Ic63910c870837f5b37e4407ba5b3c7629e925c17 --- res/values/strings.xml | 16 ++++++++-------- res/xml/encryption_and_credential.xml | 4 ++-- .../EncryptionStatusPreferenceController.java | 4 ++-- ...EncryptionStatusPreferenceControllerTest.java | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index b3bbb46ad07..73a3d3c7935 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -700,12 +700,12 @@ Security Encryption & credentials - + Phone encrypted - Phone not encrypted - + Phone not encrypted + Device encrypted - Device not encrypted + Device not encrypted Lock screen @@ -1243,15 +1243,15 @@ Yes, remove - Encryption + Encryption - Encrypt tablet + Encrypt tablet - Encrypt phone + Encrypt phone - Encrypted + Encrypted diff --git a/res/xml/encryption_and_credential.xml b/res/xml/encryption_and_credential.xml index 9cfc2b8a52b..1f5b005dac7 100644 --- a/res/xml/encryption_and_credential.xml +++ b/res/xml/encryption_and_credential.xml @@ -21,11 +21,11 @@ + android:title="@string/encryption_settings_title"> diff --git a/src/com/android/settings/security/EncryptionStatusPreferenceController.java b/src/com/android/settings/security/EncryptionStatusPreferenceController.java index c6d71858c41..d83579822d4 100644 --- a/src/com/android/settings/security/EncryptionStatusPreferenceController.java +++ b/src/com/android/settings/security/EncryptionStatusPreferenceController.java @@ -55,9 +55,9 @@ public class EncryptionStatusPreferenceController extends BasePreferenceControll public void updateState(Preference preference) { final boolean encryptionEnabled = LockPatternUtils.isDeviceEncryptionEnabled(); if (encryptionEnabled) { - preference.setSummary(R.string.crypt_keeper_encrypted_summary); + preference.setSummary(R.string.encrypted_summary); } else { - preference.setSummary(R.string.decryption_settings_summary); + preference.setSummary(R.string.not_encrypted_summary); } } diff --git a/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java index 670299efcef..970564aa04f 100644 --- a/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java @@ -94,7 +94,7 @@ public class EncryptionStatusPreferenceControllerTest { assertThat(mPreference.getFragment()).isNull(); assertThat(mPreference.getSummary()) - .isEqualTo(mContext.getText(R.string.crypt_keeper_encrypted_summary)); + .isEqualTo(mContext.getText(R.string.encrypted_summary)); } @Test @@ -103,7 +103,7 @@ public class EncryptionStatusPreferenceControllerTest { mController.updateState(mPreference); - final CharSequence summary = mContext.getText(R.string.decryption_settings_summary); + final CharSequence summary = mContext.getText(R.string.not_encrypted_summary); assertThat(mPreference.getSummary()).isEqualTo(summary); assertThat(mController.getPreferenceKey()).isNotEqualTo(PREF_KEY_ENCRYPTION_SECURITY_PAGE); assertThat(mPreference.getFragment()).isNull(); @@ -118,7 +118,7 @@ public class EncryptionStatusPreferenceControllerTest { mController.updateState(mPreference); - final CharSequence summary = mContext.getText(R.string.decryption_settings_summary); + final CharSequence summary = mContext.getText(R.string.not_encrypted_summary); assertThat(mPreference.getSummary()).isEqualTo(summary); assertThat(mPreference.getFragment()).isNull(); }