Merge "Add a default string for failures." into sc-qpr1-dev am: 7d26092122
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15671476 Change-Id: I4cabc454b70f147a1fad609ad5c5d1c9f92036f0
This commit is contained in:
@@ -794,9 +794,9 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
|
||||
// This is used as a last resort in case a vendor string is missing
|
||||
// It should not happen for anything other than FACE_ERROR_VENDOR, but
|
||||
// warn and use the default if all else fails.
|
||||
// TODO(b/196639965): update string
|
||||
Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode);
|
||||
return "";
|
||||
return context.getString(
|
||||
com.android.internal.R.string.face_error_vendor_unknown);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1390,9 +1390,9 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
|
||||
// This is used as a last resort in case a vendor string is missing
|
||||
// It should not happen for anything other than FINGERPRINT_ERROR_VENDOR, but
|
||||
// warn and use the default if all else fails.
|
||||
// TODO(b/196639965): update string
|
||||
Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode);
|
||||
return "";
|
||||
return context.getString(
|
||||
com.android.internal.R.string.fingerprint_error_vendor_unknown);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1650,6 +1650,8 @@
|
||||
<!-- Array containing custom error messages from vendor. Vendor is expected to add and translate these strings -->
|
||||
<string-array name="fingerprint_error_vendor">
|
||||
</string-array>
|
||||
<!-- Default error message to use when fingerprint_error_vendor does not contain a message. [CHAR LIMIT=NONE] -->
|
||||
<string name="fingerprint_error_vendor_unknown">Something went wrong. Try again.</string>
|
||||
|
||||
<!-- Content description which should be used for the fingerprint icon. -->
|
||||
<string name="fingerprint_icon_content_description">Fingerprint icon</string>
|
||||
@@ -1760,6 +1762,8 @@
|
||||
<!-- Array containing custom error messages from vendor. Vendor is expected to add and translate these strings -->
|
||||
<string-array name="face_error_vendor">
|
||||
</string-array>
|
||||
<!-- Default error message to use when face_error_vendor does not contain a message. [CHAR LIMIT=NONE] -->
|
||||
<string name="face_error_vendor_unknown">Something went wrong. Try again.</string>
|
||||
|
||||
<!-- Content description which should be used for the face icon. [CHAR LIMIT=10] -->
|
||||
<string name="face_icon_content_description">Face icon</string>
|
||||
|
||||
@@ -2526,6 +2526,7 @@
|
||||
<java-symbol type="string" name="fingerprint_error_no_space" />
|
||||
<java-symbol type="string" name="fingerprint_error_timeout" />
|
||||
<java-symbol type="array" name="fingerprint_error_vendor" />
|
||||
<java-symbol type="string" name="fingerprint_error_vendor_unknown" />
|
||||
<java-symbol type="string" name="fingerprint_acquired_partial" />
|
||||
<java-symbol type="string" name="fingerprint_acquired_insufficient" />
|
||||
<java-symbol type="string" name="fingerprint_acquired_imager_dirty" />
|
||||
@@ -2565,6 +2566,7 @@
|
||||
<java-symbol type="string" name="face_error_no_space" />
|
||||
<java-symbol type="string" name="face_error_timeout" />
|
||||
<java-symbol type="array" name="face_error_vendor" />
|
||||
<java-symbol type="string" name="face_error_vendor_unknown" />
|
||||
<java-symbol type="string" name="face_error_canceled" />
|
||||
<java-symbol type="string" name="face_error_user_canceled" />
|
||||
<java-symbol type="string" name="face_error_lockout" />
|
||||
|
||||
Reference in New Issue
Block a user