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 6552bdd0ef)
Merged-In: Ic63910c870837f5b37e4407ba5b3c7629e925c17
This commit is contained in:
Eric Biggers
2022-01-11 17:01:22 -08:00
parent 922a11f659
commit 64dc746a68
4 changed files with 15 additions and 15 deletions

View File

@@ -700,12 +700,12 @@
<string name="security_settings_title">Security</string>
<!-- Security Settings screen setting option title for the item to take you to the encryption and credential screen -->
<string name="encryption_and_credential_settings_title">Encryption &amp; credentials</string>
<!-- Security Settings screen Encryption and crendential summary -->
<!-- Security Settings screen Encryption and credential summary -->
<string name="encryption_and_credential_settings_summary" product="default">Phone encrypted</string>
<string name="decryption_settings_summary" product="default">Phone not encrypted</string>
<!-- Security Settings screen Encryption and crendential summary -->
<string name="not_encrypted_summary" product="default">Phone not encrypted</string>
<!-- Security Settings screen Encryption and credential summary -->
<string name="encryption_and_credential_settings_summary" product="tablet">Device encrypted</string>
<string name="decryption_settings_summary" product="tablet">Device not encrypted</string>
<string name="not_encrypted_summary" product="tablet">Device not encrypted</string>
<!-- Screen title for a list of settings controlling what to show on user's lockscreen [CHAR LIMIT=60] -->
<string name="lockscreen_settings_title">Lock screen</string>
<!-- Category title for the settings that control what lockscreen shows. [CHAR LIMIT=30] -->
@@ -1243,15 +1243,15 @@
<string name="fingerprint_last_delete_confirm">Yes, remove</string>
<!-- Title of the preferences category for preference items to control encryption -->
<string name="crypt_keeper_settings_title">Encryption</string>
<string name="encryption_settings_title">Encryption</string>
<!-- Title of the preferences item to control encryption -->
<string name="crypt_keeper_encrypt_title" product="tablet">Encrypt tablet</string>
<string name="encrypt_title" product="tablet">Encrypt tablet</string>
<!-- Title of the preferences item to control encryption -->
<string name="crypt_keeper_encrypt_title" product="default">Encrypt phone</string>
<string name="encrypt_title" product="default">Encrypt phone</string>
<!-- Summary of the preferences item to control encryption, when encryption is active -->
<string name="crypt_keeper_encrypted_summary">Encrypted</string>
<string name="encrypted_summary">Encrypted</string>
<!-- Unlock Picker Settings --><skip />

View File

@@ -21,11 +21,11 @@
<PreferenceCategory
android:key="encryption_and_credentials_status_category"
android:title="@string/crypt_keeper_settings_title">
android:title="@string/encryption_settings_title">
<Preference
android:key="encryption_and_credentials_encryption_status"
android:title="@string/crypt_keeper_encrypt_title"
android:title="@string/encrypt_title"
android:summary="@string/summary_placeholder" />
</PreferenceCategory>

View File

@@ -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);
}
}

View File

@@ -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();
}