- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
53 lines
1.7 KiB
Java
53 lines
1.7 KiB
Java
package androidx.biometric;
|
|
|
|
import android.os.Build;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.biometric.BiometricPrompt;
|
|
|
|
/* loaded from: classes.dex */
|
|
class AuthenticatorUtils {
|
|
private static final int BIOMETRIC_CLASS_MASK = 32767;
|
|
|
|
public static boolean isDeviceCredentialAllowed(int i) {
|
|
return (i & 32768) != 0;
|
|
}
|
|
|
|
public static boolean isSomeBiometricAllowed(int i) {
|
|
return (i & BIOMETRIC_CLASS_MASK) != 0;
|
|
}
|
|
|
|
public static boolean isSupportedCombination(int i) {
|
|
if (i == 15 || i == 255) {
|
|
return true;
|
|
}
|
|
if (i == 32768) {
|
|
return Build.VERSION.SDK_INT >= 30;
|
|
}
|
|
if (i != 32783) {
|
|
return i == 33023 || i == 0;
|
|
}
|
|
int i2 = Build.VERSION.SDK_INT;
|
|
return i2 < 28 || i2 > 29;
|
|
}
|
|
|
|
public static boolean isWeakBiometricAllowed(int i) {
|
|
return (i & 255) == 255;
|
|
}
|
|
|
|
private AuthenticatorUtils() {
|
|
}
|
|
|
|
public static String convertToString(int i) {
|
|
return i != 15 ? i != 255 ? i != 32768 ? i != 32783 ? i != 33023 ? String.valueOf(i) : "BIOMETRIC_WEAK | DEVICE_CREDENTIAL" : "BIOMETRIC_STRONG | DEVICE_CREDENTIAL" : "DEVICE_CREDENTIAL" : "BIOMETRIC_WEAK" : "BIOMETRIC_STRONG";
|
|
}
|
|
|
|
public static int getConsolidatedAuthenticators(@NonNull BiometricPrompt.PromptInfo promptInfo, @Nullable BiometricPrompt.CryptoObject cryptoObject) {
|
|
if (promptInfo.getAllowedAuthenticators() != 0) {
|
|
return promptInfo.getAllowedAuthenticators();
|
|
}
|
|
int i = cryptoObject != null ? 15 : 255;
|
|
return promptInfo.isDeviceCredentialAllowed() ? 32768 | i : i;
|
|
}
|
|
}
|