Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c31c7578 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge changes from topic "face-dialog"

* changes:
  3/n: Add FaceDialogView and "confirmation" plumbing
  2/n: Refactor common code from FingerprintDialogView
  1/n: Rename FingerprintDialogView to BiometricDialogView
parents 6df15718 6cf54e81
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -521,16 +521,16 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
     */
    public static String getErrorString(Context context, int errMsg, int vendorCode) {
        switch (errMsg) {
            case FACE_ERROR_HW_UNAVAILABLE:
                return context.getString(
                        com.android.internal.R.string.face_error_hw_not_available);
            case FACE_ERROR_UNABLE_TO_PROCESS:
                return context.getString(
                        com.android.internal.R.string.face_error_unable_to_process);
            case FACE_ERROR_TIMEOUT:
                return context.getString(com.android.internal.R.string.face_error_timeout);
            case FACE_ERROR_HW_UNAVAILABLE:
                return context.getString(
                        com.android.internal.R.string.face_error_hw_not_available);
            case FACE_ERROR_NO_SPACE:
                return context.getString(com.android.internal.R.string.face_error_no_space);
            case FACE_ERROR_TIMEOUT:
                return context.getString(com.android.internal.R.string.face_error_timeout);
            case FACE_ERROR_CANCELED:
                return context.getString(com.android.internal.R.string.face_error_canceled);
            case FACE_ERROR_LOCKOUT:
@@ -538,6 +538,8 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
            case FACE_ERROR_LOCKOUT_PERMANENT:
                return context.getString(
                        com.android.internal.R.string.face_error_lockout_permanent);
            case FACE_ERROR_USER_CANCELED:
                return context.getString(com.android.internal.R.string.face_error_user_canceled);
            case FACE_ERROR_NOT_ENROLLED:
                return context.getString(com.android.internal.R.string.face_error_not_enrolled);
            case FACE_ERROR_HW_NOT_PRESENT:
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ interface IFaceService {

    // This method invokes the BiometricDialog. The arguments are almost the same as above,
    // but should only be called from (BiometricPromptService).
    void authenticateFromService(IBinder token, long sessionId, int userId,
            IBiometricPromptServiceReceiver receiver, int flags, String opPackageName,
    void authenticateFromService(boolean requireConfirmation, IBinder token, long sessionId,
            int userId, IBiometricPromptServiceReceiver receiver, int flags, String opPackageName,
            in Bundle bundle, IBiometricPromptReceiver dialogReceiver,
            int callingUid, int callingPid, int callingUserId);

+2 −1
Original line number Diff line number Diff line
@@ -141,7 +141,8 @@ oneway interface IStatusBar
    void showShutdownUi(boolean isReboot, String reason);

    // Used to show the dialog when BiometricService starts authentication
    void showBiometricDialog(in Bundle bundle, IBiometricPromptReceiver receiver, int type);
    void showBiometricDialog(in Bundle bundle, IBiometricPromptReceiver receiver, int type,
            boolean requireConfirmation);
    // Used to hide the dialog when a biometric is authenticated
    void onBiometricAuthenticated();
    // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc
+2 −1
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ interface IStatusBarService
    void showPinningEscapeToast();

    // Used to show the dialog when BiometricService starts authentication
    void showBiometricDialog(in Bundle bundle, IBiometricPromptReceiver receiver, int type);
    void showBiometricDialog(in Bundle bundle, IBiometricPromptReceiver receiver, int type,
            boolean requireConfirmation);
    // Used to hide the dialog when a biometric is authenticated
    void onBiometricAuthenticated();
    // Used to set a temporary message, e.g. fingerprint not recognized, finger moved too fast, etc
+6 −0
Original line number Diff line number Diff line
@@ -1439,6 +1439,10 @@
    <string name="biometric_not_recognized">Not recognized</string>
    <!-- Accessibility message announced when a fingerprint has been authenticated [CHAR LIMIT=NONE] -->
    <string name="fingerprint_authenticated">Fingerprint authenticated</string>
    <!-- Accessibility message announced when a face has been authenticated [CHAR LIMIT=NONE] -->
    <string name="face_authenticated_no_confirmation_required">Face authenticated</string>
    <!-- Accessibility message announced when a face has been authenticated, but requires the user to press the confirm button [CHAR LIMIT=NONE] -->
    <string name="face_authenticated_confirmation_required">Face authenticated, please press confirm</string>

    <!-- Error message shown when the fingerprint hardware can't be accessed -->
    <string name="fingerprint_error_hw_not_available">Fingerprint hardware not available.</string>
@@ -1516,6 +1520,8 @@
    <string name="face_error_no_space">Face can\u2019t be stored.</string>
    <!-- Generic error message shown when the face operation (e.g. enrollment or authentication) is canceled. Generally not shown to the user. [CHAR LIMIT=50] -->
    <string name="face_error_canceled">Face operation canceled.</string>
    <!-- Generic error message shown when the face authentication operation is canceled due to user input. Generally not shown to the user [CHAR LIMIT=50] -->
    <string name="face_error_user_canceled">Face authentication canceled by user.</string>
    <!-- Generic error message shown when the face operation fails because too many attempts have been made. [CHAR LIMIT=50] -->
    <string name="face_error_lockout">Too many attempts. Try again later.</string>
    <!-- Generic error message shown when the face operation fails because strong authentication is required. [CHAR LIMIT=50] -->
Loading