Change preference title if Active Unlock enabled

Change the title of the preference to reflect that Active Unlock can
also be used to unlock the device.

Test: make RunSettingsRoboTests
Bug: b/271782800
Change-Id: Ie227e6dddfc024235fc3568899ef151f14f17696
This commit is contained in:
Derek Jedral
2023-04-26 16:27:15 -07:00
parent 1f4ec6257f
commit 5a75cd54d4
4 changed files with 74 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ public class CombinedBiometricSettings extends BiometricsSettingsBase {
private static final String KEY_UNLOCK_PHONE = "biometric_settings_biometric_keyguard";
private static final String KEY_USE_IN_APPS = "biometric_settings_biometric_app";
private static final String KEY_INTRO_PREFERENCE = "biometric_intro";
private static final String KEY_USE_BIOMETRIC_PREFERENCE = "biometric_ways_to_use";
private ActiveUnlockStatusUtils mActiveUnlockStatusUtils;
private CombinedBiometricStatusUtils mCombinedBiometricStatusUtils;
@@ -83,6 +84,11 @@ public class CombinedBiometricSettings extends BiometricsSettingsBase {
if (introPreference != null) {
introPreference.setTitle(mActiveUnlockStatusUtils.getIntroForActiveUnlock());
}
final Preference useBiometricPreference = findPreference(KEY_USE_BIOMETRIC_PREFERENCE);
if (useBiometricPreference != null) {
useBiometricPreference.setTitle(
mActiveUnlockStatusUtils.getUseBiometricTitleForActiveUnlock());
}
getActivity().setTitle(mActiveUnlockStatusUtils.getTitleForActiveUnlock());
}