Add re-enrollment notification for face AIDL

1) Move re-enrollment logic to its own class
2) Show / clear the notification when appropriate for face AIDL

Fixes: 180652977
Test: manual
Change-Id: I85b386be132974cda6e6e973b244f3cb8300c291
This commit is contained in:
Kevin Chyn
2021-02-23 13:58:59 -08:00
parent f8cc3c16d8
commit 7b6dd6a64c
9 changed files with 120 additions and 50 deletions

View File

@@ -144,6 +144,12 @@ public interface BiometricConstants {
*/
int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15;
/**
* Authentication cannot proceed because re-enrollment is required.
* @hide
*/
int BIOMETRIC_ERROR_RE_ENROLL = 16;
/**
* This constant is only used by SystemUI. It notifies SystemUI that authentication was paused
* because the authentication attempt was unsuccessful.

View File

@@ -152,6 +152,12 @@ public interface BiometricFaceConstants {
*/
int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15;
/**
* Authentication cannot proceed because re-enrollment is required.
* @hide
*/
int BIOMETRIC_ERROR_RE_ENROLL = 16;
/**
* @hide
*/

View File

@@ -165,6 +165,12 @@ public interface BiometricFingerprintConstants {
*/
public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15;
/**
* Authentication cannot proceed because re-enrollment is required.
* @hide
*/
int BIOMETRIC_ERROR_RE_ENROLL = 16;
/**
* @hide
*/

View File

@@ -820,6 +820,9 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
case BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED:
return context.getString(
com.android.internal.R.string.face_error_security_update_required);
case BIOMETRIC_ERROR_RE_ENROLL:
return context.getString(
com.android.internal.R.string.face_recalibrate_notification_content);
case FACE_ERROR_VENDOR: {
String[] msgArray = context.getResources().getStringArray(
com.android.internal.R.array.face_error_vendor);