Merge "Minor todo cleanup" into udc-dev

This commit is contained in:
Chandru S
2023-04-14 16:24:12 +00:00
committed by Android (Google) Code Review
3 changed files with 8 additions and 8 deletions

View File

@@ -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(

View File

@@ -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"
)

View File

@@ -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()