mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-03 03:00:23 +01:00
65 lines
1.9 KiB
Java
65 lines
1.9 KiB
Java
package androidx.biometric;
|
|
|
|
import android.content.Context;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
class ErrorUtils {
|
|
private ErrorUtils() {
|
|
}
|
|
|
|
@NonNull
|
|
public static String getFingerprintErrorString(@Nullable Context context, int i) {
|
|
if (context == null) {
|
|
return "";
|
|
}
|
|
if (i == 1) {
|
|
return context.getString(R.string.fingerprint_error_hw_not_available);
|
|
}
|
|
if (i != 7) {
|
|
switch (i) {
|
|
case 9:
|
|
break;
|
|
case 10:
|
|
return context.getString(R.string.fingerprint_error_user_canceled);
|
|
case 11:
|
|
return context.getString(R.string.fingerprint_error_no_fingerprints);
|
|
case 12:
|
|
return context.getString(R.string.fingerprint_error_hw_not_present);
|
|
default:
|
|
ErrorUtils$$ExternalSyntheticOutline0.m(i, "Unknown error code: ", "BiometricUtils");
|
|
return context.getString(R.string.default_error_msg);
|
|
}
|
|
}
|
|
return context.getString(R.string.fingerprint_error_lockout);
|
|
}
|
|
|
|
public static boolean isKnownError(int i) {
|
|
switch (i) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
case 7:
|
|
case 8:
|
|
case 9:
|
|
case 10:
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
case 15:
|
|
return true;
|
|
case 6:
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public static boolean isLockoutError(int i) {
|
|
return i == 7 || i == 9;
|
|
}
|
|
}
|