Updated Fingerprint enrollment logging

Test: Verified regular fingerprint enrollment correctly logged
enrollment.
Test: Verified that the find fingerprint sensor activity no longer
falsely reports a failed enrollment.
Bug: 175316123

Fingerprint enrollment shows a find sensor screen which makes a call to
FingerprintManager.enroll(), the purpose is to get the user to locate
the sensor. The consequence was that logging built into the framework
was incorrectly logging a failed enrollment after cancellation.

Change-Id: I4777613fe521f04cc97c471e0a1e85e5809d7f06
This commit is contained in:
joshmccloskey
2021-01-06 19:20:20 -08:00
parent 26474eb02f
commit 75587638ff
4 changed files with 20 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.verify;
import android.content.Intent;
@@ -95,7 +96,8 @@ public class FingerprintEnrollEnrollingTest {
any(byte[].class),
any(CancellationSignal.class),
anyInt(),
callbackCaptor.capture());
callbackCaptor.capture(),
eq(true));
return callbackCaptor.getValue();
}

View File

@@ -21,6 +21,7 @@ import static com.google.common.truth.Truth.assertWithMessage;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.verify;
import static org.robolectric.RuntimeEnvironment.application;
@@ -30,7 +31,6 @@ import android.content.Intent;
import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintManager.EnrollmentCallback;
import android.os.CancellationSignal;
import android.widget.Button;
import com.android.settings.R;
import com.android.settings.biometrics.BiometricEnrollBase;
@@ -152,7 +152,8 @@ public class FingerprintEnrollFindSensorTest {
any(byte[].class),
any(CancellationSignal.class),
anyInt(),
callbackCaptor.capture());
callbackCaptor.capture(),
eq(false));
return callbackCaptor.getValue();
}