Fix tests for BiometricsSafetySource and LockScreenSafetySource.
It seems these tests have been failing for a while (probably they were never passing in the first place; as the issue appears to be with the tests and not the prod code). Are they not being run on pre and/or post-submit? Bug: 323649900 Test: atest LockScreenSafetySourceTest && atest BiometricsSafetySourceTest Change-Id: Ie75241455317da6749ccf648dae71c49ea9f766f
This commit is contained in:
@@ -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