import typing

import android.content
import android.graphics
import android.os
import android.security.identity
import java
import java.lang
import java.security
import java.util
import java.util.concurrent
import javax.crypto

class BiometricManager(java.lang.Object):
    BIOMETRIC_ERROR_HW_UNAVAILABLE: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_IDENTITY_CHECK_NOT_ACTIVE: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NONE_ENROLLED: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NOT_ENABLED_FOR_APPS: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NO_HARDWARE: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED: typing.ClassVar[int] = ...
    BIOMETRIC_NO_AUTHENTICATION: typing.ClassVar[int] = ...
    BIOMETRIC_SUCCESS: typing.ClassVar[int] = ...
    @typing.overload
    def canAuthenticate(self) -> int: ...
    @typing.overload
    def canAuthenticate(self, authenticators: int | java.jint | java.lang.Integer, /) -> int: ...
    def getLastAuthenticationTime(self, authenticators: int | java.jint | java.lang.Integer, /) -> int: ...
    def getStrings(self, authenticators: int | java.jint | java.lang.Integer, /) -> BiometricManager.Strings: ...

    class Strings(java.lang.Object):
        def getButtonLabel(self) -> java.lang.CharSequence: ...
        def getPromptMessage(self) -> java.lang.CharSequence: ...
        def getSettingName(self) -> java.lang.CharSequence: ...

    class Authenticators(java.lang.Object):
        BIOMETRIC_STRONG: typing.ClassVar[int] = ...
        BIOMETRIC_WEAK: typing.ClassVar[int] = ...
        DEVICE_CREDENTIAL: typing.ClassVar[int] = ...
        IDENTITY_CHECK: typing.ClassVar[int] = ...

class BiometricPrompt(java.lang.Object):
    AUTHENTICATION_RESULT_TYPE_BIOMETRIC: typing.ClassVar[int] = ...
    AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL: typing.ClassVar[int] = ...
    BIOMETRIC_ACQUIRED_GOOD: typing.ClassVar[int] = ...
    BIOMETRIC_ACQUIRED_IMAGER_DIRTY: typing.ClassVar[int] = ...
    BIOMETRIC_ACQUIRED_INSUFFICIENT: typing.ClassVar[int] = ...
    BIOMETRIC_ACQUIRED_PARTIAL: typing.ClassVar[int] = ...
    BIOMETRIC_ACQUIRED_TOO_FAST: typing.ClassVar[int] = ...
    BIOMETRIC_ACQUIRED_TOO_SLOW: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_CANCELED: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_HW_NOT_PRESENT: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_HW_UNAVAILABLE: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_IDENTITY_CHECK_NOT_ACTIVE: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_LOCKOUT: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_LOCKOUT_PERMANENT: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NOT_ENABLED_FOR_APPS: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NO_BIOMETRICS: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_NO_SPACE: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_TIMEOUT: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_UNABLE_TO_PROCESS: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_USER_CANCELED: typing.ClassVar[int] = ...
    BIOMETRIC_ERROR_VENDOR: typing.ClassVar[int] = ...
    BIOMETRIC_NO_AUTHENTICATION: typing.ClassVar[int] = ...
    @typing.overload
    def authenticate(self, cancel: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: BiometricPrompt.AuthenticationCallback, /) -> None: ...
    @typing.overload
    def authenticate(self, crypto: BiometricPrompt.CryptoObject, cancel: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: BiometricPrompt.AuthenticationCallback, /) -> None: ...
    def getAllowedAuthenticators(self) -> int: ...
    def getContentView(self) -> PromptContentView | None: ...
    def getDescription(self) -> java.lang.CharSequence | None: ...
    def getLogoBitmap(self) -> android.graphics.Bitmap | None: ...
    def getLogoDescription(self) -> str | None: ...
    def getLogoRes(self) -> int: ...
    def getNegativeButtonText(self) -> java.lang.CharSequence | None: ...
    def getSubtitle(self) -> java.lang.CharSequence | None: ...
    def getTitle(self) -> java.lang.CharSequence: ...
    def isConfirmationRequired(self) -> bool: ...

    class CryptoObject(java.lang.Object):
        @typing.overload
        def __init__(self, operationHandle: int | java.jlong | java.lang.Long, /) -> None: ...
        @typing.overload
        def __init__(self, credential: android.security.identity.IdentityCredential, /) -> None: ...
        @typing.overload
        def __init__(self, session: android.security.identity.PresentationSession, /) -> None: ...
        @typing.overload
        def __init__(self, signature: java.security.Signature, /) -> None: ...
        @typing.overload
        def __init__(self, cipher: javax.crypto.Cipher, /) -> None: ...
        @typing.overload
        def __init__(self, mac: javax.crypto.Mac, /) -> None: ...
        def getCipher(self) -> javax.crypto.Cipher: ...
        def getIdentityCredential(self) -> android.security.identity.IdentityCredential: ...
        def getMac(self) -> javax.crypto.Mac: ...
        def getOperationHandle(self) -> int: ...
        def getPresentationSession(self) -> android.security.identity.PresentationSession: ...
        def getSignature(self) -> java.security.Signature: ...

    class Builder(java.lang.Object):
        def __init__(self, context: android.content.Context, /) -> None: ...
        def build(self) -> BiometricPrompt: ...
        def setAllowedAuthenticators(self, authenticators: int | java.jint | java.lang.Integer, /) -> BiometricPrompt.Builder: ...
        def setConfirmationRequired(self, requireConfirmation: bool | java.jboolean | java.lang.Boolean, /) -> BiometricPrompt.Builder: ...
        def setContentView(self, view: PromptContentView, /) -> BiometricPrompt.Builder: ...
        def setDescription(self, description: java.lang.CharSequence, /) -> BiometricPrompt.Builder: ...
        def setDeviceCredentialAllowed(self, allowed: bool | java.jboolean | java.lang.Boolean, /) -> BiometricPrompt.Builder: ...
        def setLogoBitmap(self, logoBitmap: android.graphics.Bitmap, /) -> BiometricPrompt.Builder: ...
        def setLogoDescription(self, logoDescription: str | java.lang.String, /) -> BiometricPrompt.Builder: ...
        def setLogoRes(self, logoRes: int | java.jint | java.lang.Integer, /) -> BiometricPrompt.Builder: ...
        def setNegativeButton(self, text: java.lang.CharSequence, executor: java.util.concurrent.Executor, listener: android.content.DialogInterface.OnClickListener, /) -> BiometricPrompt.Builder: ...
        def setSubtitle(self, subtitle: java.lang.CharSequence, /) -> BiometricPrompt.Builder: ...
        def setTitle(self, title: java.lang.CharSequence, /) -> BiometricPrompt.Builder: ...

    class AuthenticationResult(java.lang.Object):
        def getAuthenticationType(self) -> int: ...
        def getCryptoObject(self) -> BiometricPrompt.CryptoObject: ...

    class AuthenticationCallback(java.lang.Object):
        def __init__(self) -> None: ...
        def onAuthenticationError(self, errorCode: int | java.jint | java.lang.Integer, errString: java.lang.CharSequence, /) -> None: ...
        def onAuthenticationFailed(self) -> None: ...
        def onAuthenticationHelp(self, helpCode: int | java.jint | java.lang.Integer, helpString: java.lang.CharSequence, /) -> None: ...
        def onAuthenticationSucceeded(self, result: BiometricPrompt.AuthenticationResult, /) -> None: ...

class PromptContentItem(java.lang.Object): ...

class PromptContentItemBulletedText(PromptContentItem, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PromptContentItemBulletedText]] = ...
    def __init__(self, text: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PromptContentItemPlainText(PromptContentItem, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PromptContentItemPlainText]] = ...
    def __init__(self, text: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PromptContentView(java.lang.Object): ...

class PromptContentViewWithMoreOptionsButton(PromptContentView, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PromptContentViewWithMoreOptionsButton]] = ...
    def describeContents(self) -> int: ...
    def getDescription(self) -> str | None: ...
    def getMoreOptionsButtonListener(self) -> android.content.DialogInterface.OnClickListener: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> PromptContentViewWithMoreOptionsButton: ...
        def setDescription(self, description: str | java.lang.String, /) -> PromptContentViewWithMoreOptionsButton.Builder: ...
        def setMoreOptionsButtonListener(self, executor: java.util.concurrent.Executor, listener: android.content.DialogInterface.OnClickListener, /) -> PromptContentViewWithMoreOptionsButton.Builder: ...

class PromptVerticalListContentView(PromptContentView, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PromptVerticalListContentView]] = ...
    def describeContents(self) -> int: ...
    def getDescription(self) -> str | None: ...
    def getListItems(self) -> java.util.List[PromptContentItem]: ...
    @staticmethod
    def getMaxEachItemCharacterNumber() -> int: ...
    @staticmethod
    def getMaxItemCount() -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        @typing.overload
        def addListItem(self, listItem: PromptContentItem, /) -> PromptVerticalListContentView.Builder: ...
        @typing.overload
        def addListItem(self, listItem: PromptContentItem, index: int | java.jint | java.lang.Integer, /) -> PromptVerticalListContentView.Builder: ...
        def build(self) -> PromptVerticalListContentView: ...
        def setDescription(self, description: str | java.lang.String, /) -> PromptVerticalListContentView.Builder: ...
