Merge "To hide the soft input window when press skip button on Skip setup for PIN and face dialog of Set a PIN screen to avoid flash during transition." into sc-dev am: 1ff0fe1d5a
am: 9f5abd16de
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15079270 Change-Id: Idf0089efe5dcb17b7ff3cef8f3adf2d2dceb1062
This commit is contained in:
@@ -24,6 +24,7 @@ import static org.robolectric.RuntimeEnvironment.application;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
@@ -55,6 +56,7 @@ import org.robolectric.annotation.Implementation;
|
||||
import org.robolectric.annotation.Implements;
|
||||
import org.robolectric.shadows.ShadowActivity;
|
||||
import org.robolectric.shadows.ShadowDialog;
|
||||
import org.robolectric.shadows.ShadowInputMethodManager;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -149,6 +151,9 @@ public class SetupChooseLockPasswordTest {
|
||||
@Test
|
||||
public void createActivity_skipButtonInIntroductionStage_shouldBeVisible() {
|
||||
SetupChooseLockPassword activity = createSetupChooseLockPassword();
|
||||
final InputMethodManager inputMethodManager = activity
|
||||
.getSystemService(InputMethodManager.class);
|
||||
final ShadowInputMethodManager shadowImm = Shadows.shadowOf(inputMethodManager);
|
||||
|
||||
final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
|
||||
final Button skipOrClearButton =
|
||||
@@ -159,6 +164,7 @@ public class SetupChooseLockPasswordTest {
|
||||
skipOrClearButton.performClick();
|
||||
final AlertDialog chooserDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
|
||||
assertThat(chooserDialog).isNotNull();
|
||||
assertThat(shadowImm.isSoftInputVisible()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user