Merge "Fix tests for BiometricsSafetySource and LockScreenSafetySource." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
2904abd561
@@ -114,7 +114,7 @@ public class BiometricsSafetySourceTest {
|
||||
|
||||
@Test
|
||||
public void setSafetySourceData_whenSafetyCenterIsEnabled_withoutBiometrics_setsNullData() {
|
||||
when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(false);
|
||||
when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
|
||||
when(mFingerprintManager.isHardwareDetected()).thenReturn(false);
|
||||
when(mFaceManager.isHardwareDetected()).thenReturn(false);
|
||||
|
||||
|
||||
@@ -413,6 +413,8 @@ public class LockScreenSafetySourceTest {
|
||||
when(mSafetyCenterManagerWrapper.isEnabled(mApplicationContext)).thenReturn(true);
|
||||
when(mScreenLockPreferenceDetailsUtils.isPasswordQualityManaged(anyInt(), any()))
|
||||
.thenReturn(false);
|
||||
when(mScreenLockPreferenceDetailsUtils.isLockPatternSecure()).thenReturn(true);
|
||||
when(mScreenLockPreferenceDetailsUtils.shouldShowGearMenu()).thenReturn(true);
|
||||
|
||||
LockScreenSafetySource.setSafetySourceData(
|
||||
mApplicationContext, mScreenLockPreferenceDetailsUtils, EVENT_SOURCE_STATE_CHANGED);
|
||||
|
||||
Reference in New Issue
Block a user