Minor todo cleanup
Fixes: 275795864 Test: atest BiometricSettingsRepositoryTest Change-Id: I93ace7934090346b0b6cdb28f58ce6db06e948be
This commit is contained in:
@@ -1349,7 +1349,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
|
||||
default void onEnrollmentsChanged(@Modality int modality) {}
|
||||
|
||||
/**
|
||||
* Called when UDFPS enrollments have changed. This is called after boot and on changes to
|
||||
* Called when enrollments have changed. This is called after boot and on changes to
|
||||
* enrollment.
|
||||
*/
|
||||
default void onEnrollmentsChanged(
|
||||
|
||||
@@ -212,14 +212,9 @@ constructor(
|
||||
userId: Int,
|
||||
hasEnrollments: Boolean
|
||||
) {
|
||||
// TODO(b/242022358), use authController.isFaceAuthEnrolled after
|
||||
// ag/20176811 is available.
|
||||
if (
|
||||
sensorBiometricType == BiometricType.FACE &&
|
||||
userId == selectedUserId
|
||||
) {
|
||||
if (sensorBiometricType == BiometricType.FACE) {
|
||||
trySendWithFailureLogging(
|
||||
hasEnrollments,
|
||||
authController.isFaceAuthEnrolled(selectedUserId),
|
||||
TAG,
|
||||
"Face enrollment changed"
|
||||
)
|
||||
|
||||
@@ -227,10 +227,14 @@ class BiometricSettingsRepositoryTest : SysuiTestCase() {
|
||||
|
||||
assertThat(faceEnrolled()).isFalse()
|
||||
|
||||
whenever(authController.isFaceAuthEnrolled(ANOTHER_USER_ID)).thenReturn(true)
|
||||
|
||||
enrollmentChange(FACE, ANOTHER_USER_ID, true)
|
||||
|
||||
assertThat(faceEnrolled()).isFalse()
|
||||
|
||||
whenever(authController.isFaceAuthEnrolled(PRIMARY_USER_ID)).thenReturn(true)
|
||||
|
||||
enrollmentChange(FACE, PRIMARY_USER_ID, true)
|
||||
|
||||
assertThat(faceEnrolled()).isTrue()
|
||||
@@ -264,6 +268,7 @@ class BiometricSettingsRepositoryTest : SysuiTestCase() {
|
||||
|
||||
verify(authController).addCallback(authControllerCallback.capture())
|
||||
|
||||
whenever(authController.isFaceAuthEnrolled(ANOTHER_USER_ID)).thenReturn(true)
|
||||
enrollmentChange(FACE, ANOTHER_USER_ID, true)
|
||||
|
||||
assertThat(faceEnrolled()).isTrue()
|
||||
|
||||
Reference in New Issue
Block a user