use of com.android.settings.password.ChooseLockPassword.IntentBuilder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ChooseLockPasswordTest method setActivityAndGetIconDrawable.
private ShadowDrawable setActivityAndGetIconDrawable(boolean addFingerprintExtra) {
ChooseLockPassword passwordActivity = buildChooseLockPasswordActivity(new IntentBuilder(application).setUserId(UserHandle.myUserId()).setForFingerprint(addFingerprintExtra).build());
ChooseLockPasswordFragment fragment = getChooseLockPasswordFragment(passwordActivity);
return Shadows.shadowOf(((GlifLayout) fragment.getView()).getIcon());
}
use of com.android.settings.password.ChooseLockPassword.IntentBuilder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ChooseLockPasswordTest method intentBuilder_setMinComplexityMedium_hasMinComplexityExtraMedium.
@Test
public void intentBuilder_setMinComplexityMedium_hasMinComplexityExtraMedium() {
Intent intent = new IntentBuilder(application).setRequestedMinComplexity(PASSWORD_COMPLEXITY_MEDIUM).build();
assertThat(intent.hasExtra(EXTRA_KEY_REQUESTED_MIN_COMPLEXITY)).isTrue();
assertThat(intent.getIntExtra(EXTRA_KEY_REQUESTED_MIN_COMPLEXITY, PASSWORD_COMPLEXITY_NONE)).isEqualTo(PASSWORD_COMPLEXITY_MEDIUM);
}
use of com.android.settings.password.ChooseLockPassword.IntentBuilder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ChooseLockPasswordTest method intentBuilder_setMinComplexityNotCalled.
@Test
public void intentBuilder_setMinComplexityNotCalled() {
Intent intent = new IntentBuilder(application).build();
assertThat(intent.hasExtra(EXTRA_KEY_REQUESTED_MIN_COMPLEXITY)).isFalse();
}
use of com.android.settings.password.ChooseLockPassword.IntentBuilder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SetupChooseLockPasswordTest method createActivity_shouldNotCrash.
@Test
public void createActivity_shouldNotCrash() {
// Basic sanity test for activity created without crashing
final Intent intent = SetupChooseLockPassword.modifyIntentForSetup(application, new IntentBuilder(application).build());
ActivityController.of(new SetupChooseLockPassword(), intent).setup().get();
}
use of com.android.settings.password.ChooseLockPassword.IntentBuilder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SetupChooseLockPasswordTest method createSetupChooseLockPassword.
private SetupChooseLockPassword createSetupChooseLockPassword() {
final Intent intent = SetupChooseLockPassword.modifyIntentForSetup(application, new IntentBuilder(application).build());
intent.putExtra(ChooseLockGenericFragment.EXTRA_SHOW_OPTIONS_BUTTON, true);
return ActivityController.of(new SetupChooseLockPassword(), intent).setup().get();
}
Aggregations