Fix pattern rotation header text.

Bug: 278055194
Test: atest ChooseLockPatternTest
Change-Id: I36ec325b46d7a7f583d94dc26f9962cadc3874cd
This commit is contained in:
Hao Dong
2023-06-14 22:27:58 +00:00
parent fa2f6edc55
commit 35ebdefcd8
2 changed files with 27 additions and 13 deletions

View File

@@ -442,7 +442,8 @@ public class ChooseLockPattern extends SettingsActivity {
protected boolean mForFace;
protected boolean mForBiometrics;
private static final String KEY_UI_STAGE = "uiStage";
@VisibleForTesting
static final String KEY_UI_STAGE = "uiStage";
private static final String KEY_PATTERN_CHOICE = "chosenPattern";
private static final String KEY_CURRENT_PATTERN = "currentPattern";
@@ -718,10 +719,6 @@ public class ChooseLockPattern extends SettingsActivity {
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
mUiStage = stage;
if (stage == Stage.Introduction) {
layout.setDescriptionText(stage.headerMessage);
}
// header text, footer text, visibility and
// enabled state all known from the stage
if (stage == Stage.ChoiceTooShort) {
@@ -744,16 +741,13 @@ public class ChooseLockPattern extends SettingsActivity {
Theme theme = getActivity().getTheme();
theme.resolveAttribute(R.attr.colorError, typedValue, true);
mHeaderText.setTextColor(typedValue.data);
} else if (mDefaultHeaderColorList != null) {
mHeaderText.setTextColor(mDefaultHeaderColorList);
}
} else {
if (mDefaultHeaderColorList != null) {
mHeaderText.setTextColor(mDefaultHeaderColorList);
}
if (stage == Stage.NeedToConfirm) {
mHeaderText.setText(stage.headerMessage);
layout.setHeaderText(R.string.lockpassword_draw_your_pattern_again_header);
}
if (stage == Stage.ConfirmWrong || stage == Stage.NeedToConfirm) {
layout.setHeaderText(R.string.lockpassword_draw_your_pattern_again_header);
}
updateFooterLeftButton(stage);