Merge "Fix landscape pattern enroll crash" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e20f8934c9
@@ -120,6 +120,14 @@
|
|||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- left : skip -->
|
||||||
|
<Button android:id="@+id/skip_button"
|
||||||
|
style="@style/SuwGlifButton.Secondary"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/skip_label"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- left / top button: skip, or re-try -->
|
<!-- left / top button: skip, or re-try -->
|
||||||
<Button android:id="@+id/footerLeftButton"
|
<Button android:id="@+id/footerLeftButton"
|
||||||
style="@style/SetupWizardButton.Negative"
|
style="@style/SetupWizardButton.Negative"
|
||||||
|
@@ -16,9 +16,9 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
|
<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
|
||||||
<LinearLayout
|
<com.android.setupwizardlib.view.ButtonBarLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
style="@style/SuwGlifButtonBar"
|
style="@style/SuwGlifButtonBar.Stackable"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
@@ -49,4 +49,4 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/lockpattern_tutorial_continue_label" />
|
android:text="@string/lockpattern_tutorial_continue_label" />
|
||||||
|
|
||||||
</LinearLayout>
|
</com.android.setupwizardlib.view.ButtonBarLayout>
|
||||||
|
@@ -101,9 +101,7 @@ public class SetupChooseLockPatternTest {
|
|||||||
ReflectionHelpers.callInstanceMethod(lockPatternView, "notifyPatternDetected");
|
ReflectionHelpers.callInstanceMethod(lockPatternView, "notifyPatternDetected");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Config(qualifiers = "sw400dp")
|
private void verifyScreenLockOptionsShown() {
|
||||||
@Test
|
|
||||||
public void sw400dp_shouldShowScreenLockOptions() {
|
|
||||||
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);
|
||||||
@@ -115,14 +113,36 @@ public class SetupChooseLockPatternTest {
|
|||||||
assertThat(count).named("List items shown").isEqualTo(3);
|
assertThat(count).named("List items shown").isEqualTo(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Config(qualifiers = "sw300dp")
|
@Config(qualifiers = "sw400dp")
|
||||||
@Test
|
@Test
|
||||||
public void smallScreens_shouldHideScreenLockOptions() {
|
public void sw400dp_shouldShowScreenLockOptions() {
|
||||||
|
verifyScreenLockOptionsShown();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Config(qualifiers = "sw400dp-land")
|
||||||
|
@Test
|
||||||
|
public void sw400dpLandscape_shouldShowScreenLockOptions() {
|
||||||
|
verifyScreenLockOptionsShown();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void verifyScreenLockOptionsHidden() {
|
||||||
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.GONE);
|
assertThat(button.getVisibility()).isEqualTo(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Config(qualifiers = "sw300dp")
|
||||||
|
@Test
|
||||||
|
public void smallScreens_shouldHideScreenLockOptions() {
|
||||||
|
verifyScreenLockOptionsHidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Config(qualifiers = "sw300dp-land")
|
||||||
|
@Test
|
||||||
|
public void smallScreensLandscape_shouldHideScreenLockOptions() {
|
||||||
|
verifyScreenLockOptionsHidden();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void skipButton_shouldBeVisible_duringNonFingerprintFlow() {
|
public void skipButton_shouldBeVisible_duringNonFingerprintFlow() {
|
||||||
Button skipButton = mActivity.findViewById(R.id.skip_button);
|
Button skipButton = mActivity.findViewById(R.id.skip_button);
|
||||||
|
Reference in New Issue
Block a user