Merge "Fix pattern rotation header text." into udc-qpr-dev am: a7af958f4c am: f24edbfc3b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23699586

Change-Id: I6e1cd3c3b1965db0da12bd4115fd2e1c20858435
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hao Dong
2023-06-23 19:41:57 +00:00
committed by Automerger Merge Worker
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);