Update text when Active Unlock is enabled.

Update the security summary, intro, and unlock your phone summary when
Active Unlock is enabled and enrolled on the device.

Test: make RunSettingsRoboTests
Test: manually flip flags, confirm combined page has updated strings
Bug: 264812018
Change-Id: I2843e9f3aa0f38a9f2ebb18d60fed6293f9ce36e
This commit is contained in:
Derek Jedral
2023-01-24 22:00:01 -08:00
parent 334e48f4ff
commit 9134f24f31
7 changed files with 288 additions and 5 deletions

View File

@@ -107,10 +107,7 @@ public abstract class BiometricsSettingsBase extends DashboardFragment {
launchChooseOrConfirmLock();
}
final Preference unlockPhonePreference = findPreference(getUnlockPhonePreferenceKey());
if (unlockPhonePreference != null) {
unlockPhonePreference.setSummary(getUseAnyBiometricSummary());
}
updateUnlockPhonePreferenceSummary();
final Preference useInAppsPreference = findPreference(getUseInAppsPreferenceKey());
if (useInAppsPreference != null) {
@@ -309,8 +306,15 @@ public abstract class BiometricsSettingsBase extends DashboardFragment {
}
}
protected void updateUnlockPhonePreferenceSummary() {
final Preference unlockPhonePreference = findPreference(getUnlockPhonePreferenceKey());
if (unlockPhonePreference != null) {
unlockPhonePreference.setSummary(getUseAnyBiometricSummary());
}
}
@NonNull
private String getUseAnyBiometricSummary() {
protected String getUseAnyBiometricSummary() {
boolean isFaceAllowed = mFaceManager != null && mFaceManager.isHardwareDetected();
boolean isFingerprintAllowed =
mFingerprintManager != null && mFingerprintManager.isHardwareDetected();