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

Commit b018ff89 authored by Wenhui Yang's avatar Wenhui Yang
Browse files

[5/n] FRR notification strings update

Update the strings with UX spec.

Bug: 258872351
Fixes: 295065274
Test: Manual
Change-Id: Iccfde45bdeb74a40cc8bfc9a954304323f40198e
parent 1c0cfcca
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -1887,22 +1887,22 @@
    <!-- Content description which should be used for the fingerprint icon. -->
    <string name="fingerprint_icon_content_description">Fingerprint icon</string>

    <!-- Notification name shown when the system requires the user to set up device unlock. [CHAR LIMIT=NONE] -->
    <string name="device_unlock_notification_name">Device unlock</string>
    <!-- Notification title shown when the system suggests the user to set up another way to unlock. [CHAR LIMIT=NONE] -->
    <string name="alternative_unlock_setup_notification_title">Try another way to unlock</string>
    <!-- Notification content shown when the system suggests the user to enroll their face. [CHAR LIMIT=NONE] -->
    <string name="alternative_face_setup_notification_content">Use Face Unlock when your fingerprint isn\'t recognized, like when your fingers are wet</string>
    <!-- Notification content shown when the system suggests the user to enroll their fingerprint. [CHAR LIMIT=NONE] -->
    <string name="alternative_fp_setup_notification_content">Use Fingerprint Unlock when your face isn\'t recognized, like when there\'s not enough light</string>
    <!-- Notification name shown when the system requires the user to re-enroll their face. [CHAR LIMIT=NONE] -->
    <string name="face_recalibrate_notification_name">Face Unlock</string>
    <!-- Notification title shown when the system requires the user to re-enroll their face. [CHAR LIMIT=NONE] -->
    <string name="face_recalibrate_notification_title">Issue with Face Unlock</string>
    <!-- Notification content shown when the system requires the user to re-enroll their face. [CHAR LIMIT=NONE] -->
    <string name="face_recalibrate_notification_content">Tap to delete your face model, then add your face again</string>
    <!-- Title of a notification that directs the user to set up Face Unlock by enrolling their face. [CHAR LIMIT=NONE] -->
    <string name="face_setup_notification_title">Set up Face Unlock</string>
    <!-- Contents of a notification that directs the user to set up face unlock by enrolling their face. [CHAR LIMIT=NONE] -->
    <string name="face_setup_notification_content">Unlock your phone by looking at it</string>
    <!-- Error message indicating that the camera privacy sensor has been turned on [CHAR LIMIT=NONE] -->
    <string name="face_sensor_privacy_enabled">To use Face Unlock, turn on <b>Camera access</b> in Settings > Privacy</string>
    <!-- Title of a notification that directs the user to enroll a fingerprint. [CHAR LIMIT=NONE] -->
    <string name="fingerprint_setup_notification_title">Set up more ways to unlock</string>
    <!-- Contents of a notification that directs the user to enroll a fingerprint. [CHAR LIMIT=NONE] -->
    <string name="fingerprint_setup_notification_content">Tap to add a fingerprint</string>

    <!-- Notification name shown when the system requires the user to re-calibrate their fingerprint. [CHAR LIMIT=NONE] -->
    <string name="fingerprint_recalibrate_notification_name">Fingerprint Unlock</string>
+6 −3
Original line number Diff line number Diff line
@@ -2584,6 +2584,12 @@
  <!-- Biometric FRR config -->
  <java-symbol type="fraction" name="config_biometricNotificationFrrThreshold" />

  <!-- Biometric FRR notification messages -->
  <java-symbol type="string" name="device_unlock_notification_name" />
  <java-symbol type="string" name="alternative_unlock_setup_notification_title" />
  <java-symbol type="string" name="alternative_face_setup_notification_content" />
  <java-symbol type="string" name="alternative_fp_setup_notification_content" />

  <!-- Device credential strings for BiometricManager -->
  <java-symbol type="string" name="screen_lock_app_setting_name" />
  <java-symbol type="string" name="screen_lock_dialog_default_subtitle" />
@@ -2623,8 +2629,6 @@
  <java-symbol type="string" name="fingerprint_recalibrate_notification_name" />
  <java-symbol type="string" name="fingerprint_recalibrate_notification_title" />
  <java-symbol type="string" name="fingerprint_recalibrate_notification_content" />
  <java-symbol type="string" name="fingerprint_setup_notification_title" />
  <java-symbol type="string" name="fingerprint_setup_notification_content" />
  <java-symbol type="string" name="fingerprint_error_power_pressed" />

  <!-- Fingerprint config -->
@@ -2692,7 +2696,6 @@
  <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="string" name="face_setup_notification_title" />

  <java-symbol type="string" name="config_biometric_prompt_ui_package" />
  <java-symbol type="array" name="config_biometric_sensors" />
+3 −2
Original line number Diff line number Diff line
@@ -93,8 +93,9 @@ public class AuthenticationStatsCollector {

    /** Update total authentication and rejected attempts. */
    public void authenticate(int userId, boolean authenticated) {
        // Initialize mUserAuthenticationStatsMap when authenticate to ensure SharedPreferences
        // are ready for application use and avoid ramdump issue.
        // SharedPreference is not ready when starting system server, initialize
        // mUserAuthenticationStatsMap in authentication to ensure SharedPreference
        // is ready for application use.
        if (mUserAuthenticationStatsMap.isEmpty()) {
            initializeUserAuthenticationStatsMap();
        }
+2 −2
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ public class AuthenticationStatsPersister {
     */
    public void removeFrrStats(int userId) {
        try {
            // Copy into a new HashSet to avoid iterator exception.
            // Copy into a new HashSet to allow modification.
            Set<String> frrStatsSet = new HashSet<>(readFrrStats());

            // Remove the old authentication stat for the user if it exists.
@@ -122,7 +122,7 @@ public class AuthenticationStatsPersister {
    public void persistFrrStats(int userId, int totalAttempts, int rejectedAttempts,
            int enrollmentNotifications, int modality) {
        try {
            // Copy into a new HashSet to avoid iterator exception.
            // Copy into a new HashSet to allow modification.
            Set<String> frrStatsSet = new HashSet<>(readFrrStats());

            // Remove the old authentication stat for the user if it exists.
+6 −6
Original line number Diff line number Diff line
@@ -87,11 +87,11 @@ public class BiometricNotificationUtils {
    public static void showFaceEnrollNotification(@NonNull Context context) {

        final String name =
                context.getString(R.string.face_recalibrate_notification_name);
                context.getString(R.string.device_unlock_notification_name);
        final String title =
                context.getString(R.string.fingerprint_setup_notification_title);
                context.getString(R.string.alternative_unlock_setup_notification_title);
        final String content =
                context.getString(R.string.face_setup_notification_title);
                context.getString(R.string.alternative_face_setup_notification_content);

        final Intent intent = new Intent(FACE_ENROLL_ACTION);
        intent.setPackage(SETTINGS_PACKAGE);
@@ -112,11 +112,11 @@ public class BiometricNotificationUtils {
    public static void showFingerprintEnrollNotification(@NonNull Context context) {

        final String name =
                context.getString(R.string.fingerprint_recalibrate_notification_name);
                context.getString(R.string.device_unlock_notification_name);
        final String title =
                context.getString(R.string.fingerprint_setup_notification_title);
                context.getString(R.string.alternative_unlock_setup_notification_title);
        final String content =
                context.getString(R.string.fingerprint_setup_notification_content);
                context.getString(R.string.alternative_fp_setup_notification_content);

        final Intent intent = new Intent(FINGERPRINT_ENROLL_ACTION);
        intent.setPackage(SETTINGS_PACKAGE);