Home
last modified time | relevance | path

Searched refs:mFaceManager (Results 1 – 25 of 43) sorted by relevance

12

/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/combination/
DCombinedBiometricStatusUtilsTest.java72 private FaceManager mFaceManager; field in CombinedBiometricStatusUtilsTest
92 when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager); in setUp()
100 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withoutFingerprint_withoutFace_returnsFalse()
108 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withoutFingerprint_whenFace_returnsFalse()
116 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_whenFingerprint_withoutFace_returnsFalse()
124 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_whenFingerprint_whenFace_returnsTrue()
132 when(mFaceManager.isHardwareDetected()).thenReturn(false); in hasEnrolled_withoutFingerprintHardware_withoutFaceHardware_returnsFalse()
140 when(mFaceManager.isHardwareDetected()).thenReturn(true); in hasEnrolled_withoutFingerprintEnroll_withoutFaceEnroll_returnsFalse()
142 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false); in hasEnrolled_withoutFingerprintEnroll_withoutFaceEnroll_returnsFalse()
150 when(mFaceManager.isHardwareDetected()).thenReturn(true); in hasEnrolled_withoutFingerprintEnroll_withFaceEnroll_returnsTrue()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/safetycenter/
DBiometricsSafetySourceTest.java83 @Mock private FaceManager mFaceManager; field in BiometricsSafetySourceTest
100 when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager); in setUp()
127 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_whenSafetyCenterIsEnabled_withoutBiometrics_setsNullData()
140 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_setsDataForBiometricSource()
155 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_setsDataWithCorrectSafetyEvent()
169 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_withFingerprintNotEnrolled_whenDisabledByAdmin_setsData()
185 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_withFingerprintNotEnrolled_whenNotDisabledByAdmin_setsData()
202 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_withFingerprintsEnrolled_whenDisabledByAdmin_setsData()
222 when(mFaceManager.isHardwareDetected()).thenReturn(false); in setSafetySourceData_withFingerprintsEnrolled_whenNotDisabledByAdmin_setsData()
241 when(mFaceManager.isHardwareDetected()).thenReturn(true); in setSafetySourceData_withFaceNotEnrolled_whenDisabledByAdmin_setsData()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/biometrics/activeunlock/
DActiveUnlockStatusUtilsTest.java58 @Mock private FaceManager mFaceManager; field in ActiveUnlockStatusUtilsTest
71 when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager); in setUp()
73 when(mFaceManager.isHardwareDetected()).thenReturn(true); in setUp()
93 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withoutFingerprint_withoutFace_returnsUnsupported()
101 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withoutFingerprint_withFace_returnsAvailable()
109 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withFingerprint_withoutFace_returnsAvailable()
117 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withFingerprint_withFace_returnsAvailable()
134 when(mFaceManager.isHardwareDetected()).thenReturn(true); in getTitle_faceEnabled_returnsFacePreferenceTitle()
144 when(mFaceManager.isHardwareDetected()).thenReturn(false); in getTitle_fingerprintEnabled_returnsFingerprintPreferenceTitle()
156 when(mFaceManager.isHardwareDetected()).thenReturn(true); in getIntro_faceEnabled_returnsFace()
[all …]
DActiveUnlockStatusPreferenceControllerTest.java62 @Mock private FaceManager mFaceManager; field in ActiveUnlockStatusPreferenceControllerTest
78 ShadowApplication.getInstance().setSystemService(Context.FACE_SERVICE, mFaceManager); in setUp()
84 when(mFaceManager.isHardwareDetected()).thenReturn(true); in setUp()
107 when(mFaceManager.isHardwareDetected()).thenReturn(false); in updateState_withoutFingerprint_withoutFace_isNotVisible()
117 when(mFaceManager.isHardwareDetected()).thenReturn(true); in updateState_withoutFingerprint_withFace_isVisible()
127 when(mFaceManager.isHardwareDetected()).thenReturn(false); in updateState_withFingerprint_withoutFace_isVisible()
137 when(mFaceManager.isHardwareDetected()).thenReturn(true); in updateState_withFingerprint_withFace_isVisible()
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/face/
DFaceStatusUtilsTest.java63 private FaceManager mFaceManager; field in FaceStatusUtilsTest
81 when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager); in setUp()
82 mFaceStatusUtils = new FaceStatusUtils(mApplicationContext, mFaceManager, USER_ID); in setUp()
88 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withoutFingerprint_withoutFace_returnsFalse()
96 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withoutFingerprint_withFace_returnsTrue()
104 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withFingerprint_withoutFace_returnsFalse()
112 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withFingerprint_withFace_returnsFalse()
119 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true); in hasEnrolled_withEnrolledTemplates_returnsTrue()
126 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false); in hasEnrolled_withoutEnrolledTemplates_returnsFalse()
151 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false); in getSummary_whenNotEnrolled_returnsSummaryNone()
[all …]
DFaceUpdaterTest.java74 @Mock private FaceManager mFaceManager; field in FaceUpdaterTest
86 mFaceUpdater = new FaceUpdater(mContext, mFaceManager); in setUp()
98 verify(mFaceManager).enroll( in enroll_firstVersion_onEnrollmentCallbacks_triggerGivenCallback()
127 verify(mFaceManager).enroll( in enroll_firstVersion_onEnrollmentSuccess_invokedInteractionWithSafetyCenter()
149 verify(mFaceManager).enroll( in enroll_firstVersion_onEnrollmentNotYetFinished_didntInvokeInteractionWithSafetyCenter()
171 verify(mFaceManager).enroll( in enroll_secondVersion_onEnrollmentCallbacks_triggerGivenCallback()
200 verify(mFaceManager).enroll( in enroll_secondVersion_onEnrollmentSuccess_invokedInteractionWithSafetyCenter()
222 verify(mFaceManager).enroll( in enroll_secondVersion_onEnrollmentNotYetFinished_didntInvokeInteractionWithSafetyCenter()
243 verify(mFaceManager) in remove_onRemovalCallbacks_triggerGivenCallback()
259 verify(mFaceManager) in remove_onRemovalSuccess_invokedInteractionWithSafetyCenter()
/packages/apps/Settings/tests/robotests/src/com/android/settings/biometrics/combination/
DBiometricFaceStatusPreferenceControllerTest.java63 @Mock private FaceManager mFaceManager; field in BiometricFaceStatusPreferenceControllerTest
77 ShadowApplication.getInstance().setSystemService(Context.FACE_SERVICE, mFaceManager); in setUp()
93 when(mFaceManager.isHardwareDetected()).thenReturn(true); in onlyFaceEnabled_preferenceNotVisible()
103 when(mFaceManager.isHardwareDetected()).thenReturn(true); in onlyFaceAndActiveUnlockEnabled_preferenceVisible()
114 when(mFaceManager.isHardwareDetected()).thenReturn(true); in faceAndFingerprintEnabled_preferenceVisible()
122 when(mFaceManager.isHardwareDetected()).thenReturn(true); in faceDisabled_whenAdminAndNoFingerprintsEnrolled()
123 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false); in faceDisabled_whenAdminAndNoFingerprintsEnrolled()
136 when(mFaceManager.isHardwareDetected()).thenReturn(true); in faceNotDisabled_whenAdminAndFingerprintsEnrolled()
137 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true); in faceNotDisabled_whenAdminAndFingerprintsEnrolled()
151 when(mFaceManager.isHardwareDetected()).thenReturn(true); in faceNotDisabled_whenNoAdmin()
DBiometricFingerprintStatusPreferenceControllerTest.java63 @Mock private FaceManager mFaceManager; field in BiometricFingerprintStatusPreferenceControllerTest
77 ShadowApplication.getInstance().setSystemService(Context.FACE_SERVICE, mFaceManager); in setUp()
93 when(mFaceManager.isHardwareDetected()).thenReturn(false); in onlyFingerprintEnabled_preferenceNotVisible()
103 when(mFaceManager.isHardwareDetected()).thenReturn(false); in onlyFingerprintAndActiveUnlockEnabled_preferenceVisible()
114 when(mFaceManager.isHardwareDetected()).thenReturn(true); in faceAndFingerprintEnabled_preferenceVisible()
/packages/apps/Settings/tests/robotests/src/com/android/settings/biometrics/face/
DFaceStatusPreferenceControllerTest.java73 private FaceManager mFaceManager; field in FaceStatusPreferenceControllerTest
94 ShadowApplication.getInstance().setSystemService(Context.FACE_SERVICE, mFaceManager); in setUp()
106 when(mFaceManager.isHardwareDetected()).thenReturn(false); in getAvailabilityStatus_noFaceManger_DISABLED()
113 when(mFaceManager.isHardwareDetected()).thenReturn(true); in getAvailabilityStatus_hasFaceManger_AVAILABLE()
120 when(mFaceManager.isHardwareDetected()).thenReturn(false); in updateState_notSupported_shouldDoNothing()
129 when(mFaceManager.isHardwareDetected()).thenReturn(true); in updateState_noFace_shouldShowDefaultSummary()
140 when(mFaceManager.isHardwareDetected()).thenReturn(true); in updateState_hasFace_shouldShowSummary()
141 when(mFaceManager.getEnrolledFaces(anyInt())) in updateState_hasFace_shouldShowSummary()
143 when(mFaceManager.hasEnrolledTemplates(anyInt())) in updateState_hasFace_shouldShowSummary()
156 when(mFaceManager.isHardwareDetected()).thenReturn(true); in updateState_parentalConsentRequired_preferenceDisabled()
DFaceSettingsFooterPreferenceControllerTest.java65 private FaceManager mFaceManager; field in FaceSettingsFooterPreferenceControllerTest
93 ShadowApplication.getInstance().setSystemService(Context.FACE_SERVICE, mFaceManager); in displayFaceSettingsFooterPreferenceController()
104 ShadowApplication.getInstance().setSystemService(Context.FACE_SERVICE, mFaceManager); in createFaceSettingsFooterPreferenceController()
121 verify(mFaceManager).addAuthenticatorsRegisteredCallback(mCaptor.capture()); in testString_faceNotClass3()
147 verify(mFaceManager).addAuthenticatorsRegisteredCallback(mCaptor.capture()); in testString_faceClass3()
173 verify(mFaceManager).addAuthenticatorsRegisteredCallback(any()); in testSupportFaceFeature_shouldAddAuthenticatorsRegisteredCallback()
182 verify(mFaceManager, never()).addAuthenticatorsRegisteredCallback(any()); in testNoFaceFeature_shouldNotAddAuthenticatorsRegisteredCallback()
191 verify(mFaceManager, never()).addAuthenticatorsRegisteredCallback(any()); in testHasFaceFeature_shouldNotAddAuthenticatorsRegisteredCallback_inCtor()
DFaceSettingsLockscreenBypassPreferenceControllerTest.java55 private FaceManager mFaceManager; field in FaceSettingsLockscreenBypassPreferenceControllerTest
69 ShadowUtils.setFaceManager(mFaceManager); in setUp()
73 when(mContext.getSystemService(eq(Context.FACE_SERVICE))).thenReturn(mFaceManager); in setUp()
78 ReflectionHelpers.setField(mController, "mFaceManager", mFaceManager); in setUp()
90 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_whenHardwareDetected()
125 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceDisabled_byAdmin()
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/
DSetupSkipDialogTest.java63 private FaceManager mFaceManager; field in SetupSkipDialogTest
70 ShadowUtils.setFaceManager(mFaceManager); in setUp()
109 when(mFaceManager.isHardwareDetected()).thenReturn(false); in frpMessages_areShownCorrectly_whenNotSupported()
125 when(mFaceManager.isHardwareDetected()).thenReturn(false); in frpMessages_areShownCorrectly_whenSupported()
144 when(mFaceManager.isHardwareDetected()).thenReturn(hasFace); in dialogMessage_whenSkipPinSetupForFace_shouldShownCorrectly()
163 when(mFaceManager.isHardwareDetected()).thenReturn(hasFace); in dialogMessage_whenSkipPasswordSetupForFace_shouldShownCorrectly()
182 when(mFaceManager.isHardwareDetected()).thenReturn(hasFace); in dialogMessage_whenSkipPatternSetupForFace_shouldShownCorrectly()
202 when(mFaceManager.isHardwareDetected()).thenReturn(hasFace); in dialogMessage_whenSkipPinSetupForFingerprint_shouldShownCorrectly()
221 when(mFaceManager.isHardwareDetected()).thenReturn(hasFace); in dialogMessage_whenSkipPasswordSetupForFingerprint_shouldShownCorrectly()
241 when(mFaceManager.isHardwareDetected()).thenReturn(hasFace); in dialogMessage_whenSkipPatternSetupForFingerprint_shouldShownCorrectly()
[all …]
DSetNewPasswordControllerTest.java62 private FaceManager mFaceManager; field in SetNewPasswordControllerTest
74 CURRENT_USER_ID, mPackageManager, mFingerprintManager, mFaceManager, in setUp()
103 when(mFaceManager.isHardwareDetected()).thenReturn(true); in launchChooseLockWithFace()
105 when(mFaceManager.hasEnrolledTemplates(CURRENT_USER_ID)).thenReturn(false); in launchChooseLockWithFace()
170 when(mFaceManager.isHardwareDetected()).thenReturn(false); in launchChooseLockWithoutFace_noFaceSensor()
172 when(mFaceManager.hasEnrolledTemplates(CURRENT_USER_ID)).thenReturn(false); in launchChooseLockWithoutFace_noFaceSensor()
208 when(mFaceManager.isHardwareDetected()).thenReturn(true); in launchChooseLockWithoutFace_hasFaceEnrolled()
210 when(mFaceManager.hasEnrolledTemplates(CURRENT_USER_ID)).thenReturn(true); in launchChooseLockWithoutFace_hasFaceEnrolled()
246 when(mFaceManager.isHardwareDetected()).thenReturn(true); in launchChooseLockWithoutFace_deviceAdminDisallowFaceForKeyguard()
248 when(mFaceManager.hasEnrolledTemplates(CURRENT_USER_ID)).thenReturn(true); in launchChooseLockWithoutFace_deviceAdminDisallowFaceForKeyguard()
/packages/apps/Settings/src/com/android/settings/biometrics/face/
DFaceSettingsLockscreenBypassPreferenceController.java35 protected FaceManager mFaceManager; field in FaceSettingsLockscreenBypassPreferenceController
41 mFaceManager = context.getSystemService(FaceManager.class); in FaceSettingsLockscreenBypassPreferenceController()
74 } else if (!mFaceManager.hasEnrolledTemplates(getUserId())) { in updateState()
92 if (mFaceManager != null && mFaceManager.isHardwareDetected()) { in getAvailabilityStatus()
93 return mFaceManager.hasEnrolledTemplates(getUserId()) in getAvailabilityStatus()
DFaceSettingsAppPreferenceController.java41 private FaceManager mFaceManager; field in FaceSettingsAppPreferenceController
45 mFaceManager = Utils.getFaceManagerOrNull(context); in FaceSettingsAppPreferenceController()
72 } else if (!mFaceManager.hasEnrolledTemplates(getUserId())) { in updateState()
86 if(mFaceManager == null){ in getAvailabilityStatus()
92 final boolean hasEnrolledUser = mFaceManager.hasEnrolledTemplates(getUserId()); in getAvailabilityStatus()
DFaceSettingsConfirmPreferenceController.java45 private FaceManager mFaceManager; field in FaceSettingsConfirmPreferenceController
54 mFaceManager = Utils.getFaceManagerOrNull(context); in FaceSettingsConfirmPreferenceController()
74 } else if (!mFaceManager.hasEnrolledTemplates(getUserId())) { in updateState()
90 List<FaceSensorProperties> properties = mFaceManager.getSensorProperties(); in getAvailabilityStatus()
DFaceUpdater.java41 private final FaceManager mFaceManager; field in FaceUpdater
45 mFaceManager = Utils.getFaceManagerOrNull(context); in FaceUpdater()
50 mFaceManager = faceManager; in FaceUpdater()
65 mFaceManager.enroll(userId, hardwareAuthToken, cancel, in enroll()
72 mFaceManager.remove(face, userId, new NotifyingRemovalCallback(mContext, callback)); in remove()
DFaceEnrollIntroduction.java76 private FaceManager mFaceManager; field in FaceEnrollIntroduction
122 mFaceManager = getFaceManager(); in onCreate()
179 if (mFaceManager != null) { in onCreate()
180 mFaceManager.addAuthenticatorsRegisteredCallback( in onCreate()
205 mFaceManager.generateChallenge(mUserId, (sensorId, userId, challenge) -> { in onCreate()
460 if (mFaceManager != null) { in maxFacesEnrolled()
462 final int numEnrolledFaces = mFaceManager.getEnrolledFaces(mUserId).size(); in maxFacesEnrolled()
474 if (mFaceManager != null) { in checkMaxEnrolled()
486 mFaceManager = Utils.getFaceManagerOrNull(this); in getChallenge()
487 if (mFaceManager == null) { in getChallenge()
[all …]
DFaceSettingsAttentionPreferenceController.java44 private FaceManager mFaceManager; field in FaceSettingsAttentionPreferenceController
83 mFaceManager = Utils.getFaceManagerOrNull(context); in FaceSettingsAttentionPreferenceController()
122 mFaceManager.getFeature(getUserId(), FEATURE_REQUIRE_ATTENTION, in isChecked()
135 mFaceManager.setFeature(getUserId(), FEATURE_REQUIRE_ATTENTION, in setChecked()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DFaceReEnrollDialog.java46 private FaceManager mFaceManager; field in FaceReEnrollDialog
71 mFaceManager = Utils.getFaceManagerOrNull(getApplicationContext()); in onCreate()
72 mFaceUpdater = new FaceUpdater(getApplicationContext(), mFaceManager); in onCreate()
99 if (mFaceManager == null || !mFaceManager.hasEnrolledTemplates(userId)) { in removeFaceAndReEnroll()
/packages/apps/Settings/tests/unit/src/com/android/settings/security/
DSecuritySettingsTest.java77 private FaceManager mFaceManager; field in SecuritySettingsTest
100 doReturn(mFaceManager).when(mContext).getSystemService(FACE_SERVICE); in setup()
162 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceController_containsFaceWhenAvailable()
175 when(mFaceManager.isHardwareDetected()).thenReturn(false); in preferenceController_containsFingerprintWhenAvailable()
188 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceController_containsCombinedBiometricWhenAvailable()
201 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceLifecycle_faceShowsThenCombined()
237 when(mFaceManager.isHardwareDetected()).thenReturn(false); in preferenceLifecycle_fingerprintShowsThenCombined()
262 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceLifecycle_fingerprintShowsThenCombined()
273 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceLifecycle_combinedShowsThenFace()
309 when(mFaceManager.isHardwareDetected()).thenReturn(true); in preferenceLifecycle_combinedShowsThenFingerprint()
[all …]
/packages/apps/Settings/src/com/android/settings/biometrics/combination/
DBiometricSettingsAppPreferenceController.java41 private FaceManager mFaceManager; field in BiometricSettingsAppPreferenceController
46 mFaceManager = Utils.getFaceManagerOrNull(context); in BiometricSettingsAppPreferenceController()
79 if (mFaceManager == null || mFingerprintManager == null) { in getAvailabilityStatus()
84 final boolean hasFaceEnrolledUser = mFaceManager.hasEnrolledTemplates(mUserId); in getAvailabilityStatus()
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/fingerprint/
DFingerprintStatusUtilsTest.java67 private FaceManager mFaceManager; field in FingerprintStatusUtilsTest
85 when(mApplicationContext.getSystemService(Context.FACE_SERVICE)).thenReturn(mFaceManager); in setUp()
93 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withoutFingerprint_withoutFace_returnsFalse()
101 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withoutFingerprint_withFace_returnsFalse()
109 when(mFaceManager.isHardwareDetected()).thenReturn(false); in isAvailable_withFingerprint_withoutFace_returnsTrue()
117 when(mFaceManager.isHardwareDetected()).thenReturn(true); in isAvailable_withFingerprint_withFace_returnsFalse()
/packages/apps/Settings/src/com/android/settings/password/
DSetNewPasswordController.java64 private final FaceManager mFaceManager; field in SetNewPasswordController
104 mFaceManager = faceManager; in SetNewPasswordController()
124 final boolean shouldShowFaceEnroll = mFaceManager != null in dispatchSetNewPasswordIntent()
125 && mFaceManager.isHardwareDetected() in dispatchSetNewPasswordIntent()
126 && !mFaceManager.hasEnrolledTemplates(mTargetUserId) in dispatchSetNewPasswordIntent()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DFaceSetupSlice.java58 private FaceManager mFaceManager; field in FaceSetupSlice
80 mFaceManager = Utils.getFaceManagerOrNull(mContext); in getSlice()
81 if (mFaceManager == null) { in getSlice()
87 final boolean hasEnrolledTemplates = mFaceManager.hasEnrolledTemplates(userId); in getSlice()
129 final boolean hasEnrolledTemplates = mFaceManager.hasEnrolledTemplates( in getIntent()

12