Remove remainder of generateChallengeBlocking

Test: make -j56 RunSettingsRoboTests

Face Tests:
Test: Open face settings, remove face, add face
Test: Open face settings, but cancel credential confirmation.
      Face settings does not show up
Test: adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Able to enroll face

Fingerprint Tests:
Test: Open fingerprint settings, add button is shown
Test: Open fingerprint settings, but cancel credential confirmation.
      Fingerprint settings does not show up
Test: adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Able to enroll fingerprint

Bug: 162533680
Change-Id: Ie448ed086e73b0b545bd3a2e62437c543f7aad6c
This commit is contained in:
Kevin Chyn
2020-07-30 15:38:54 -07:00
parent 66bfe45f99
commit bee84e2daa
5 changed files with 43 additions and 37 deletions

View File

@@ -54,8 +54,6 @@ import org.robolectric.RobolectricTestRunner;
public final class SetNewPasswordControllerTest {
private static final int CURRENT_USER_ID = 101;
private static final long FINGERPRINT_CHALLENGE = -9876512313131L;
private static final long FACE_CHALLENGE = 1352057789L;
@Mock
private PackageManager mPackageManager;
@@ -76,11 +74,7 @@ public final class SetNewPasswordControllerTest {
mSetNewPasswordController = new SetNewPasswordController(
CURRENT_USER_ID, mPackageManager, mFingerprintManager, mFaceManager,
mDevicePolicyManager, mUi);
when(mFingerprintManager.generateChallengeBlocking()).thenReturn(FINGERPRINT_CHALLENGE);
when(mPackageManager.hasSystemFeature(eq(FEATURE_FINGERPRINT))).thenReturn(true);
when(mFaceManager.generateChallengeBlocking()).thenReturn(FACE_CHALLENGE);
when(mPackageManager.hasSystemFeature(eq(FEATURE_FACE))).thenReturn(true);
}