import typing

import android.content
import android.content.res
import androidx.startup
import java
import java.chaquopy
import java.io
import java.lang
import java.lang.annotation
import java.util
import java.util.concurrent

class DeviceProfileWriter(java.lang.Object):
    def __init__(self, assetManager: android.content.res.AssetManager, executor: java.util.concurrent.Executor, diagnosticsCallback: ProfileInstaller.DiagnosticsCallback, apkName: str | java.lang.String, profileSourceLocation: str | java.lang.String, profileMetaSourceLocation: str | java.lang.String, curProfile: java.io.File, /) -> None: ...
    def deviceAllowsProfileInstallerAotWrites(self) -> bool: ...
    def read(self) -> DeviceProfileWriter: ...
    def transcodeIfNeeded(self) -> DeviceProfileWriter: ...
    def write(self) -> bool: ...

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

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

class FileSectionType(java.lang.Enum[FileSectionType]):
    AGGREGATION_COUNT: typing.ClassVar[FileSectionType] = ...
    CLASSES: typing.ClassVar[FileSectionType] = ...
    DEX_FILES: typing.ClassVar[FileSectionType] = ...
    EXTRA_DESCRIPTORS: typing.ClassVar[FileSectionType] = ...
    METHODS: typing.ClassVar[FileSectionType] = ...
    def getValue(self) -> int: ...
    @staticmethod
    def valueOf(name: str | java.lang.String, /) -> FileSectionType: ...
    @staticmethod
    def values() -> java.chaquopy.JavaArray[FileSectionType]: ...

class ProfileInstallReceiver(android.content.BroadcastReceiver):
    ACTION_INSTALL_PROFILE: typing.ClassVar[str] = ...
    ACTION_SKIP_FILE: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def onReceive(self, context: android.content.Context, intent: android.content.Intent, /) -> None: ...

class ProfileInstaller(java.lang.Object):
    DIAGNOSTIC_CURRENT_PROFILE_DOES_NOT_EXIST: typing.ClassVar[int] = ...
    DIAGNOSTIC_CURRENT_PROFILE_EXISTS: typing.ClassVar[int] = ...
    DIAGNOSTIC_REF_PROFILE_DOES_NOT_EXIST: typing.ClassVar[int] = ...
    DIAGNOSTIC_REF_PROFILE_EXISTS: typing.ClassVar[int] = ...
    RESULT_ALREADY_INSTALLED: typing.ClassVar[int] = ...
    RESULT_BASELINE_PROFILE_NOT_FOUND: typing.ClassVar[int] = ...
    RESULT_DELETE_SKIP_FILE_SUCCESS: typing.ClassVar[int] = ...
    RESULT_DESIRED_FORMAT_UNSUPPORTED: typing.ClassVar[int] = ...
    RESULT_INSTALL_SKIP_FILE_SUCCESS: typing.ClassVar[int] = ...
    RESULT_INSTALL_SUCCESS: typing.ClassVar[int] = ...
    RESULT_IO_EXCEPTION: typing.ClassVar[int] = ...
    RESULT_META_FILE_REQUIRED_BUT_NOT_FOUND: typing.ClassVar[int] = ...
    RESULT_NOT_WRITABLE: typing.ClassVar[int] = ...
    RESULT_PARSE_EXCEPTION: typing.ClassVar[int] = ...
    RESULT_UNSUPPORTED_ART_VERSION: typing.ClassVar[int] = ...
    @typing.overload
    @staticmethod
    def writeProfile(context: android.content.Context, /) -> None: ...
    @typing.overload
    @staticmethod
    def writeProfile(context: android.content.Context, executor: java.util.concurrent.Executor, diagnostics: ProfileInstaller.DiagnosticsCallback, /) -> None: ...

    class ResultCode(java.lang.annotation.Annotation): ...

    class DiagnosticCode(java.lang.annotation.Annotation): ...

    class DiagnosticsCallback(java.lang.Object):
        def onDiagnosticReceived(self, arg1: int | java.jint | java.lang.Integer, arg2: java.lang.Object | int | bool | float | str, /) -> None: ...
        def onResultReceived(self, arg1: int | java.jint | java.lang.Integer, arg2: java.lang.Object | int | bool | float | str, /) -> None: ...

class ProfileInstallerInitializer(androidx.startup.Initializer[ProfileInstallerInitializer.Result]):
    def __init__(self) -> None: ...
    def create(self, context: android.content.Context, /) -> ProfileInstallerInitializer.Result: ...
    def dependencies(self) -> java.util.List[typing.Type[androidx.startup.Initializer[java.lang.Object]]]: ...

    class Result(java.lang.Object):
        def __init__(self) -> None: ...

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

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

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