Add debugReason to BiometricUtils#tryStartingNextBiometricEnroll
Bug: 196060286 Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL Change-Id: Ib157dd916b1cfd2238cf6844a970d70cbf56faa6
This commit is contained in:
@@ -244,7 +244,9 @@ public class BiometricUtils {
|
|||||||
* @return true if the next enrollment was started
|
* @return true if the next enrollment was started
|
||||||
*/
|
*/
|
||||||
public static boolean tryStartingNextBiometricEnroll(@NonNull Activity activity,
|
public static boolean tryStartingNextBiometricEnroll(@NonNull Activity activity,
|
||||||
int requestCode) {
|
int requestCode, String debugReason) {
|
||||||
|
|
||||||
|
Log.d(TAG, "tryStartingNextBiometricEnroll, debugReason: " + debugReason);
|
||||||
final PendingIntent pendingIntent = (PendingIntent) activity.getIntent()
|
final PendingIntent pendingIntent = (PendingIntent) activity.getIntent()
|
||||||
.getExtra(MultiBiometricEnrollHelper.EXTRA_ENROLL_AFTER_FACE);
|
.getExtra(MultiBiometricEnrollHelper.EXTRA_ENROLL_AFTER_FACE);
|
||||||
if (pendingIntent != null) {
|
if (pendingIntent != null) {
|
||||||
|
@@ -216,7 +216,8 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void onSkipButtonClick(View view) {
|
protected void onSkipButtonClick(View view) {
|
||||||
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST)) {
|
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST,
|
||||||
|
"edu_skip")) {
|
||||||
setResult(RESULT_SKIP);
|
setResult(RESULT_SKIP);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
@@ -59,28 +59,32 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCancelButtonClick(View view) {
|
protected void onCancelButtonClick(View view) {
|
||||||
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST)) {
|
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST,
|
||||||
|
"cancel")) {
|
||||||
super.onCancelButtonClick(view);
|
super.onCancelButtonClick(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onSkipButtonClick(View view) {
|
protected void onSkipButtonClick(View view) {
|
||||||
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST)) {
|
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST,
|
||||||
|
"skip")) {
|
||||||
super.onSkipButtonClick(view);
|
super.onSkipButtonClick(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onEnrollmentSkipped(@Nullable Intent data) {
|
protected void onEnrollmentSkipped(@Nullable Intent data) {
|
||||||
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST)) {
|
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST,
|
||||||
|
"skipped")) {
|
||||||
super.onEnrollmentSkipped(data);
|
super.onEnrollmentSkipped(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onFinishedEnrolling(@Nullable Intent data) {
|
protected void onFinishedEnrolling(@Nullable Intent data) {
|
||||||
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST)) {
|
if (!BiometricUtils.tryStartingNextBiometricEnroll(this, ENROLL_NEXT_BIOMETRIC_REQUEST,
|
||||||
|
"finished")) {
|
||||||
super.onFinishedEnrolling(data);
|
super.onFinishedEnrolling(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user