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

Commit eab9fe15 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Biometric phenotype updates

1) Always update strength after registerAuthenticator. Otherwise the
   flag will not be applied (e.g. after reboot)
2) Add strings for onAuthenticationError

Bug: 148419762

Test: manual
Test: atest BiometricServiceTest

Change-Id: Ia20a91e401d6753b55d6aa4a36d487fc15465ba5
parent 98e9225f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -629,6 +629,9 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
                return context.getString(com.android.internal.R.string.face_error_not_enrolled);
            case FACE_ERROR_HW_NOT_PRESENT:
                return context.getString(com.android.internal.R.string.face_error_hw_not_present);
            case BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED:
                return context.getString(
                        com.android.internal.R.string.face_error_security_update_required);
            case FACE_ERROR_VENDOR: {
                String[] msgArray = context.getResources().getStringArray(
                        com.android.internal.R.array.face_error_vendor);
+3 −0
Original line number Diff line number Diff line
@@ -967,6 +967,9 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
            case FINGERPRINT_ERROR_HW_NOT_PRESENT:
                return context.getString(
                        com.android.internal.R.string.fingerprint_error_hw_not_present);
            case BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED:
                return context.getString(
                        com.android.internal.R.string.fingerprint_error_security_update_required);
            case FINGERPRINT_ERROR_VENDOR: {
                    String[] msgArray = context.getResources().getStringArray(
                            com.android.internal.R.array.fingerprint_error_vendor);
+4 −0
Original line number Diff line number Diff line
@@ -1473,6 +1473,8 @@
    <string name="fingerprint_error_no_fingerprints">No fingerprints enrolled.</string>
    <!-- Generic error message shown when the app requests fingerprint authentication on a device without a sensor -->
    <string name="fingerprint_error_hw_not_present">This device does not have a fingerprint sensor.</string>
    <!-- Generic error message shown when fingerprint is not available due to a security vulnerability. [CHAR LIMIT=50] -->
    <string name="fingerprint_error_security_update_required">Sensor temporarily disabled.</string>

    <!-- Template to be used to name enrolled fingerprints by default. -->
    <string name="fingerprint_name_template">Finger <xliff:g id="fingerId" example="1">%d</xliff:g></string>
@@ -1564,6 +1566,8 @@
    <string name="face_error_not_enrolled">You haven\u2019t set up face unlock.</string>
    <!-- Generic error message shown when the app requests face unlock on a device without a sensor. [CHAR LIMIT=61] -->
    <string name="face_error_hw_not_present">Face unlock is not supported on this device.</string>
    <!-- Generic error message shown when face unlock is not available due to a security vulnerability. [CHAR LIMIT=50] -->
    <string name="face_error_security_update_required">Sensor temporarily disabled.</string>

    <!-- Template to be used to name enrolled faces by default. [CHAR LIMIT=10] -->
    <string name="face_name_template">Face <xliff:g id="faceId" example="1">%d</xliff:g></string>
+2 −0
Original line number Diff line number Diff line
@@ -2446,6 +2446,7 @@
  <java-symbol type="string" name="fingerprint_authenticated" />
  <java-symbol type="string" name="fingerprint_error_no_fingerprints" />
  <java-symbol type="string" name="fingerprint_error_hw_not_present" />
  <java-symbol type="string" name="fingerprint_error_security_update_required" />

  <!-- Fingerprint config -->
  <java-symbol type="integer" name="config_fingerprintMaxTemplatesPerUser"/>
@@ -2490,6 +2491,7 @@
  <java-symbol type="string" name="face_name_template" />
  <java-symbol type="string" name="face_authenticated_no_confirmation_required" />
  <java-symbol type="string" name="face_authenticated_confirmation_required" />
  <java-symbol type="string" name="face_error_security_update_required" />

  <java-symbol type="array" name="config_biometric_sensors" />

+2 −0
Original line number Diff line number Diff line
@@ -812,6 +812,8 @@ public class BiometricService extends SystemService {
            }

            mAuthenticators.add(new AuthenticatorWrapper(id, modality, strength, authenticator));

            mBiometricStrengthController.updateStrengths();
        }

        @Override // Binder call
Loading