Skip option missing on pattern lock screen

- Skip present during suw/deferred + non-fingerprint flow
- Skip hidden when opened from settings
- Skip hidden during suw/deferred when trying to setup up fingerprint

Test: Manually verified, robolectric tests updated
bug: 71763670
Change-Id: Ie3aac68a6d04c7727320af83532640580248bd47
This commit is contained in:
Ajay Nadathur
2018-01-11 13:25:26 -08:00
parent d99a8ef4f8
commit 7b1d96a345
3 changed files with 58 additions and 8 deletions

View File

@@ -412,7 +412,7 @@ public class ChooseLockPattern extends SettingsActivity {
private ChooseLockSettingsHelper mChooseLockSettingsHelper;
private SaveAndFinishWorker mSaveAndFinishWorker;
protected int mUserId;
private boolean mForFingerprint;
protected boolean mForFingerprint;
private static final String KEY_UI_STAGE = "uiStage";
private static final String KEY_PATTERN_CHOICE = "chosenPattern";
@@ -657,13 +657,7 @@ public class ChooseLockPattern extends SettingsActivity {
mFooterText.setText(stage.footerMessage);
}
if (stage.leftMode == LeftButtonMode.Gone) {
mFooterLeftButton.setVisibility(View.GONE);
} else {
mFooterLeftButton.setVisibility(View.VISIBLE);
mFooterLeftButton.setText(stage.leftMode.text);
mFooterLeftButton.setEnabled(stage.leftMode.enabled);
}
updateFooterLeftButton(stage, mFooterLeftButton);
setRightButtonText(stage.rightMode.text);
setRightButtonEnabled(stage.rightMode.enabled);
@@ -713,6 +707,16 @@ public class ChooseLockPattern extends SettingsActivity {
}
}
protected void updateFooterLeftButton(Stage stage, TextView footerLeftButton) {
if (stage.leftMode == LeftButtonMode.Gone) {
footerLeftButton.setVisibility(View.GONE);
} else {
footerLeftButton.setVisibility(View.VISIBLE);
footerLeftButton.setText(stage.leftMode.text);
footerLeftButton.setEnabled(stage.leftMode.enabled);
}
}
// clear the wrong pattern unless they have started a new one
// already
private void postClearPatternRunnable() {