Update string for acquire msg FINGERPRINT_ACQUIRED_IMAGER_DIRTY on

UDFPS devices

Bug: b/330640273
Test: 1. Use tape or water to cover the FP sensor on UDFPS devices
      2. Try to enroll fingerprint
      3. Check the displayed message is correct in enrolling page
Change-Id: I9415e9e58336daa2da6eb4febf1eea7a30d07dc5
This commit is contained in:
Vincent Wang
2024-04-10 06:05:38 +00:00
parent 6a59b93701
commit a38a05769a
2 changed files with 10 additions and 1 deletions

View File

@@ -13189,4 +13189,7 @@
<string name="force_swcrypto_fallback_title">Force Software Secure Crypto</string>
<!-- Developer settings summary: select to force Software Secure Crypto.[CHAR LIMIT=NONE] -->
<string name="force_swcrypto_fallback_summary">Force DRM key management to use software-based whitebox crypto</string>
<!--Text for acquire msg on UDFPS devices -->
<string name="fingerprint_acquired_imager_dirty_udfps">Clean your screen near the sensor and try again</string>
</resources>

View File

@@ -17,6 +17,7 @@
package com.android.settings.biometrics.fingerprint;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPRINT_ACQUIRED_IMAGER_DIRTY;
import static android.text.Layout.HYPHENATION_FREQUENCY_NONE;
import android.animation.Animator;
@@ -770,10 +771,15 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
@Override
public void onEnrollmentHelp(int helpMsgId, CharSequence helpString) {
final CharSequence featuredString = mCanAssumeSfps
CharSequence featuredString = mCanAssumeSfps
? mSfpsEnrollmentFeature.getFeaturedVendorString(this, helpMsgId, helpString)
: helpString;
if (helpMsgId == FINGERPRINT_ACQUIRED_IMAGER_DIRTY && mCanAssumeUdfps) {
featuredString = getResources().getString(
R.string.fingerprint_acquired_imager_dirty_udfps);
}
if (!TextUtils.isEmpty(featuredString)) {
if (!(mCanAssumeUdfps || mCanAssumeSfps)) {
mErrorText.removeCallbacks(mTouchAgainRunnable);