Merge "Show Option of "Screen lock options" on SUW pattern screen page"
This commit is contained in:
committed by
Android (Google) Code Review
commit
579300b00c
@@ -97,7 +97,9 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
|
|||||||
if (!getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)
|
if (!getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)
|
||||||
&& mOptionsButton != null) {
|
&& mOptionsButton != null) {
|
||||||
mOptionsButton.setVisibility(
|
mOptionsButton.setVisibility(
|
||||||
stage == Stage.Introduction ? View.VISIBLE : View.INVISIBLE);
|
(stage == Stage.Introduction || stage == Stage.HelpScreen ||
|
||||||
|
stage == Stage.ChoiceTooShort || stage == Stage.FirstChoiceValid)
|
||||||
|
? View.VISIBLE : View.INVISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -92,13 +92,16 @@ public class SetupChooseLockPatternTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void selectPattern_shouldHideOptionsButton() {
|
public void optionsButton_whenPatternSelected_shouldBeVisible() {
|
||||||
Button button = mActivity.findViewById(R.id.screen_lock_options);
|
Button button = mActivity.findViewById(R.id.screen_lock_options);
|
||||||
assertThat(button).isNotNull();
|
assertThat(button).isNotNull();
|
||||||
assertThat(button.getVisibility()).isEqualTo(View.VISIBLE);
|
assertThat(button.getVisibility()).isEqualTo(View.VISIBLE);
|
||||||
|
|
||||||
LockPatternView lockPatternView = mActivity.findViewById(R.id.lockPattern);
|
LockPatternView lockPatternView = mActivity.findViewById(R.id.lockPattern);
|
||||||
ReflectionHelpers.callInstanceMethod(lockPatternView, "notifyPatternDetected");
|
ReflectionHelpers.callInstanceMethod(lockPatternView, "notifyPatternDetected");
|
||||||
|
|
||||||
|
enterPattern();
|
||||||
|
assertThat(button.getVisibility()).isEqualTo(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyScreenLockOptionsShown() {
|
private void verifyScreenLockOptionsShown() {
|
||||||
|
Reference in New Issue
Block a user