Merge "DO NOT MERGE: Change encryption preference's summary accordingly"

This commit is contained in:
Treehugger Robot
2018-03-06 18:55:54 +00:00
committed by Gerrit Code Review
3 changed files with 13 additions and 1 deletions

View File

@@ -779,8 +779,10 @@
<string name="encryption_and_credential_settings_title">Encryption &amp; credentials</string>
<!-- Security Settings screen Encryption and crendential 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="encryption_and_credential_settings_summary" product="tablet">Device encrypted</string>
<string name="decryption_settings_summary" product="tablet">Device not encrypted</string>
<!-- Security Settings screen setting option title for the item to take you to the lock screen preference screen [CHAR LIMIT=60] -->
<string name="lockscreen_settings_title">Lock screen preferences</string>

View File

@@ -60,7 +60,6 @@
<Preference
android:key="encryption_and_credential"
android:title="@string/encryption_and_credential_settings_title"
android:summary="@string/encryption_and_credential_settings_summary"
android:fragment="com.android.settings.EncryptionAndCredential"/>
<Preference android:key="manage_trust_agents"

View File

@@ -427,6 +427,17 @@ public class SecuritySettings extends SettingsPreferenceFragment
mEnterprisePrivacyPreferenceController.displayPreference(root);
mEnterprisePrivacyPreferenceController.onResume();
final Preference encryptioncredential = root.findPreference(KEY_ENCRYPTION_AND_CREDENTIALS);
if (LockPatternUtils.isDeviceEncryptionEnabled()) {
final String summaryencrypt = getContext().getString(
R.string.encryption_and_credential_settings_summary);
encryptioncredential.setSummary(summaryencrypt);
} else {
final String summarydecrypt = getContext().getString(
R.string.decryption_settings_summary);
encryptioncredential.setSummary(summarydecrypt);
}
return root;
}