Remove subtext from work challenge screens

Bug: 201045654
Test: manual
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Change-Id: Ibd65e27d5ed2762d04aa7750908506d0353a0727
This commit is contained in:
Rubin Xu
2021-12-09 13:27:03 +00:00
parent db1feef7e0
commit 70172863a7
4 changed files with 24 additions and 60 deletions

View File

@@ -363,54 +363,49 @@ public class ChooseLockPattern extends SettingsActivity {
Introduction(
R.string.lock_settings_picker_biometrics_added_security_message,
R.string.lockpattern_choose_pattern_description,
R.string.lockpattern_recording_intro_header,
LeftButtonMode.Gone, RightButtonMode.ContinueDisabled,
ID_EMPTY_MESSAGE, true),
HelpScreen(
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_settings_help_how_to_record,
ID_EMPTY_MESSAGE, R.string.lockpattern_settings_help_how_to_record,
LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false),
ChoiceTooShort(
R.string.lock_settings_picker_biometrics_added_security_message,
R.string.lockpattern_choose_pattern_description,
R.string.lockpattern_recording_incorrect_too_short,
LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,
ID_EMPTY_MESSAGE, true),
FirstChoiceValid(
R.string.lock_settings_picker_biometrics_added_security_message,
R.string.lockpattern_choose_pattern_description,
R.string.lockpattern_pattern_entered_header,
LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),
NeedToConfirm(
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_confirm,
ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_confirm,
LeftButtonMode.Gone, RightButtonMode.ConfirmDisabled,
ID_EMPTY_MESSAGE, true),
ConfirmWrong(
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_unlock_wrong,
ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_unlock_wrong,
LeftButtonMode.Gone, RightButtonMode.ConfirmDisabled,
ID_EMPTY_MESSAGE, true),
ChoiceConfirmed(
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_pattern_confirmed_header,
ID_EMPTY_MESSAGE, R.string.lockpattern_pattern_confirmed_header,
LeftButtonMode.Gone, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false);
/**
* @param messageForBiometrics The message displayed at the top, above header for
* fingerprint flow.
* @param message The message displayed at the top.
* @param headerMessage The message displayed at the top.
* @param leftMode The mode of the left button.
* @param rightMode The mode of the right button.
* @param footerMessage The footer message.
* @param patternEnabled Whether the pattern widget is enabled.
*/
Stage(int messageForBiometrics, int message, int headerMessage,
Stage(int messageForBiometrics, int headerMessage,
LeftButtonMode leftMode,
RightButtonMode rightMode,
int footerMessage, boolean patternEnabled) {
this.headerMessage = headerMessage;
this.messageForBiometrics = messageForBiometrics;
this.message = message;
this.leftMode = leftMode;
this.rightMode = rightMode;
this.footerMessage = footerMessage;
@@ -419,7 +414,6 @@ public class ChooseLockPattern extends SettingsActivity {
final int headerMessage;
final int messageForBiometrics;
final int message;
final LeftButtonMode leftMode;
final RightButtonMode rightMode;
final int footerMessage;
@@ -735,11 +729,14 @@ public class ChooseLockPattern extends SettingsActivity {
}
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
final boolean forAnyBiometric = mForFingerprint || mForFace || mForBiometrics;
int message = forAnyBiometric ? stage.messageForBiometrics : stage.message;
if (message == ID_EMPTY_MESSAGE) {
layout.setDescriptionText("");
if (forAnyBiometric) {
if (stage.messageForBiometrics == ID_EMPTY_MESSAGE) {
layout.setDescriptionText("");
} else {
layout.setDescriptionText(stage.messageForBiometrics);
}
} else {
layout.setDescriptionText(message);
layout.getDescriptionTextView().setVisibility(View.GONE);
}
if (stage.footerMessage == ID_EMPTY_MESSAGE) {
mFooterText.setText("");