Added error message to error state.

This allows for further customization of string error messages when
needed.
Bug: 365565482
Flag: EXEMPT not needed
Test: manual

Change-Id: I57d6e7b09530bd810518e4154001140c5debfd6c
This commit is contained in:
Joshua McCloskey
2024-09-24 22:17:07 +00:00
committed by Joshua Mccloskey
parent cb6b37e6d6
commit d9c83e350b
2 changed files with 5 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ object Util {
return FingerEnrollState.EnrollError(
errTitle,
errString,
this,
this == FINGERPRINT_ERROR_UNABLE_TO_PROCESS,
this == FINGERPRINT_ERROR_CANCELED,
)

View File

@@ -35,10 +35,13 @@ sealed class FingerEnrollState {
data class EnrollHelp(@StringRes val helpMsgId: Int, val helpString: String) :
FingerEnrollState()
/** Represents that an unrecoverable error has been encountered and the operation is complete. */
/** Represents that an unrecoverable error has been encountered and the operation is complete.
* Note that errorId is the raw error id from [FingerprintManager]
*/
data class EnrollError(
@StringRes val errTitle: Int,
@StringRes val errString: Int,
val errorId: Int,
val shouldRetryEnrollment: Boolean,
val isCancelled: Boolean,
) : FingerEnrollState()