use of com.android.settings.password.ChooseLockPassword.ChooseLockPasswordFragment in project android_packages_apps_Settings by crdroidandroid.
the class ChooseLockPasswordTest method setActivityAndGetIconDrawable.
private ShadowDrawable setActivityAndGetIconDrawable(boolean addFingerprintExtra) {
ChooseLockPassword passwordActivity = Robolectric.buildActivity(ChooseLockPassword.class, new IntentBuilder(application).setUserId(UserHandle.myUserId()).setForFingerprint(addFingerprintExtra).build()).setup().get();
ChooseLockPasswordFragment fragment = (ChooseLockPasswordFragment) passwordActivity.getFragmentManager().findFragmentById(R.id.main_content);
return Shadows.shadowOf(((GlifLayout) fragment.getView()).getIcon());
}
use of com.android.settings.password.ChooseLockPassword.ChooseLockPasswordFragment 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.ChooseLockPasswordFragment in project android_packages_apps_Settings by omnirom.
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.ChooseLockPasswordFragment in project android_packages_apps_Settings by omnirom.
the class ChooseLockPasswordTest method assertPasswordValidationResultForIntent.
private void assertPasswordValidationResultForIntent(LockscreenCredential userEnteredPassword, Intent intent, String... expectedValidationResult) {
ChooseLockPassword activity = buildChooseLockPasswordActivity(intent);
ChooseLockPasswordFragment fragment = getChooseLockPasswordFragment(activity);
fragment.validatePassword(userEnteredPassword);
String[] messages = fragment.convertErrorCodeToMessages();
assertThat(messages).asList().containsExactly(expectedValidationResult);
}
Aggregations