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

Commit d9563b7f authored by Joe Bolinger's avatar Joe Bolinger Committed by Automerger Merge Worker
Browse files

Merge "Add "Face" to not recognized message for face auth." into udc-d1-dev...

Merge "Add "Face" to not recognized message for face auth." into udc-d1-dev am: ac4f8fa8 am: 92ec539a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23547214



Change-Id: Idbdddf74e6debd130c997f61dcf4d051abae3db0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7bd9cf8b 92ec539a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1795,6 +1795,8 @@
    <string name="biometric_error_user_canceled">Authentication canceled</string>
    <!-- Message shown by the biometric dialog when biometric is not recognized -->
    <string name="biometric_not_recognized">Not recognized</string>
    <!-- Message shown by the biometric dialog when face is not recognized [CHAR LIMIT=50] -->
    <string name="biometric_face_not_recognized">Face not recognized</string>
    <!-- Message shown when biometric authentication has been canceled [CHAR LIMIT=50] -->
    <string name="biometric_error_canceled">Authentication canceled</string>
    <!-- Message returned to applications if BiometricPrompt setAllowDeviceCredentials is enabled but no pin, pattern, or password is set. [CHAR LIMIT=NONE] -->
+1 −0
Original line number Diff line number Diff line
@@ -2575,6 +2575,7 @@
  <java-symbol type="string" name="biometric_error_hw_unavailable" />
  <java-symbol type="string" name="biometric_error_user_canceled" />
  <java-symbol type="string" name="biometric_not_recognized" />
  <java-symbol type="string" name="biometric_face_not_recognized" />
  <java-symbol type="string" name="biometric_error_canceled" />
  <java-symbol type="string" name="biometric_error_device_not_secured" />
  <java-symbol type="string" name="biometric_error_generic" />
+5 −1
Original line number Diff line number Diff line
@@ -1054,6 +1054,10 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
        return false;
    }

    private String getNotRecognizedString(@Modality int modality) {
        return mContext.getString(modality == TYPE_FACE
                ? R.string.biometric_face_not_recognized : R.string.biometric_not_recognized);
    }

    private String getErrorString(@Modality int modality, int error, int vendorCode) {
        switch (modality) {
@@ -1100,7 +1104,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks,
                mCurrentDialog.animateToCredentialUI();
            } else if (isSoftError) {
                final String errorMessage = (error == BiometricConstants.BIOMETRIC_PAUSED_REJECTED)
                        ? mContext.getString(R.string.biometric_not_recognized)
                        ? getNotRecognizedString(modality)
                        : getErrorString(modality, error, vendorCode);
                if (DEBUG) Log.d(TAG, "onBiometricError, soft error: " + errorMessage);
                // The camera privacy error can return before the prompt initializes its state,