import typing

import android.app
import android.app.assist
import android.content
import android.content.res
import android.graphics
import android.os
import android.view
import java
import java.chaquopy
import java.io
import java.lang
import java.util
import java.util.concurrent
import java.util.function

class VisibleActivityInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[VisibleActivityInfo]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getActivityId(self) -> VoiceInteractionSession.ActivityId: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class VoiceInteractionService(android.app.Service):
    SERVICE_INTERFACE: typing.ClassVar[str] = ...
    SERVICE_META_DATA: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def dump(self, fd: java.io.FileDescriptor, pw: java.io.PrintWriter, args: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getDisabledShowContext(self) -> int: ...
    @staticmethod
    def isActiveService(context: android.content.Context, service: android.content.ComponentName, /) -> bool: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onGetSupportedVoiceActions(self, voiceActions: java.util.Set[java.lang.String], /) -> java.util.Set[java.lang.String]: ...
    def onLaunchVoiceAssistFromKeyguard(self) -> None: ...
    def onPrepareToShowSession(self, args: android.os.Bundle, flags: int | java.jint | java.lang.Integer, /) -> None: ...
    def onReady(self) -> None: ...
    def onShowSessionFailed(self, args: android.os.Bundle, /) -> None: ...
    def onShutdown(self) -> None: ...
    def setDisabledShowContext(self, flags: int | java.jint | java.lang.Integer, /) -> None: ...
    def setUiHints(self, hints: android.os.Bundle, /) -> None: ...
    def showSession(self, args: android.os.Bundle, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class VoiceInteractionSession(android.content.ComponentCallbacks2, android.view.KeyEvent.Callback):
    KEY_FOREGROUND_ACTIVITIES: typing.ClassVar[str] = ...
    KEY_SHOW_SESSION_ID: typing.ClassVar[str] = ...
    SHOW_SOURCE_ACTIVITY: typing.ClassVar[int] = ...
    SHOW_SOURCE_APPLICATION: typing.ClassVar[int] = ...
    SHOW_SOURCE_ASSIST_GESTURE: typing.ClassVar[int] = ...
    SHOW_SOURCE_AUTOMOTIVE_SYSTEM_UI: typing.ClassVar[int] = ...
    SHOW_SOURCE_NOTIFICATION: typing.ClassVar[int] = ...
    SHOW_SOURCE_PUSH_TO_TALK: typing.ClassVar[int] = ...
    SHOW_WITH_ASSIST: typing.ClassVar[int] = ...
    SHOW_WITH_SCREENSHOT: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, handler: android.os.Handler, /) -> None: ...
    def closeSystemDialogs(self) -> None: ...
    def dump(self, prefix: str | java.lang.String, fd: java.io.FileDescriptor, writer: java.io.PrintWriter, args: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def finish(self) -> None: ...
    def getContext(self) -> android.content.Context: ...
    def getDisabledShowContext(self) -> int: ...
    def getLayoutInflater(self) -> android.view.LayoutInflater: ...
    def getUserDisabledShowContext(self) -> int: ...
    def getWindow(self) -> android.app.Dialog: ...
    def hide(self) -> None: ...
    def onAssistStructureFailure(self, failure: java.lang.Throwable, /) -> None: ...
    def onBackPressed(self) -> None: ...
    def onCancelRequest(self, request: VoiceInteractionSession.Request, /) -> None: ...
    def onCloseSystemDialogs(self) -> None: ...
    def onComputeInsets(self, outInsets: VoiceInteractionSession.Insets, /) -> None: ...
    def onConfigurationChanged(self, newConfig: android.content.res.Configuration, /) -> None: ...
    def onCreate(self) -> None: ...
    def onCreateContentView(self) -> android.view.View: ...
    def onDestroy(self) -> None: ...
    def onDirectActionsInvalidated(self, activityId: VoiceInteractionSession.ActivityId, /) -> None: ...
    def onGetSupportedCommands(self, commands: java.chaquopy.JavaArray[java.lang.String], /) -> java.chaquopy.JavaArrayJBoolean: ...
    @typing.overload
    def onHandleAssist(self, state: VoiceInteractionSession.AssistState, /) -> None: ...
    @typing.overload
    def onHandleAssist(self, data: android.os.Bundle, structure: android.app.assist.AssistStructure, content: android.app.assist.AssistContent, /) -> None: ...
    def onHandleAssistSecondary(self, data: android.os.Bundle, structure: android.app.assist.AssistStructure, content: android.app.assist.AssistContent, index: int | java.jint | java.lang.Integer, count: int | java.jint | java.lang.Integer, /) -> None: ...
    def onHandleScreenshot(self, screenshot: android.graphics.Bitmap, /) -> None: ...
    def onHide(self) -> None: ...
    def onKeyDown(self, keyCode: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
    def onKeyLongPress(self, keyCode: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
    def onKeyMultiple(self, keyCode: int | java.jint | java.lang.Integer, count: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
    def onKeyUp(self, keyCode: int | java.jint | java.lang.Integer, event: android.view.KeyEvent, /) -> bool: ...
    def onLockscreenShown(self) -> None: ...
    def onLowMemory(self) -> None: ...
    def onPrepareShow(self, args: android.os.Bundle, showFlags: int | java.jint | java.lang.Integer, /) -> None: ...
    def onRequestAbortVoice(self, request: VoiceInteractionSession.AbortVoiceRequest, /) -> None: ...
    def onRequestCommand(self, request: VoiceInteractionSession.CommandRequest, /) -> None: ...
    def onRequestCompleteVoice(self, request: VoiceInteractionSession.CompleteVoiceRequest, /) -> None: ...
    def onRequestConfirmation(self, request: VoiceInteractionSession.ConfirmationRequest, /) -> None: ...
    def onRequestPickOption(self, request: VoiceInteractionSession.PickOptionRequest, /) -> None: ...
    def onShow(self, args: android.os.Bundle, showFlags: int | java.jint | java.lang.Integer, /) -> None: ...
    def onTaskFinished(self, intent: android.content.Intent, taskId: int | java.jint | java.lang.Integer, /) -> None: ...
    def onTaskStarted(self, intent: android.content.Intent, taskId: int | java.jint | java.lang.Integer, /) -> None: ...
    def onTrimMemory(self, level: int | java.jint | java.lang.Integer, /) -> None: ...
    def performDirectAction(self, action: android.app.DirectAction, extras: android.os.Bundle, cancellationSignal: android.os.CancellationSignal, resultExecutor: java.util.concurrent.Executor, resultListener: java.util.function.Consumer[android.os.Bundle], /) -> None: ...
    def registerVisibleActivityCallback(self, executor: java.util.concurrent.Executor, callback: VoiceInteractionSession.VisibleActivityCallback, /) -> None: ...
    def requestDirectActions(self, activityId: VoiceInteractionSession.ActivityId, cancellationSignal: android.os.CancellationSignal, resultExecutor: java.util.concurrent.Executor, callback: java.util.function.Consumer[java.util.List[android.app.DirectAction]], /) -> None: ...
    def setContentView(self, view: android.view.View, /) -> None: ...
    def setDisabledShowContext(self, flags: int | java.jint | java.lang.Integer, /) -> None: ...
    def setKeepAwake(self, keepAwake: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setTheme(self, theme: int | java.jint | java.lang.Integer, /) -> None: ...
    def setUiEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def show(self, args: android.os.Bundle, flags: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def startAssistantActivity(self, intent: android.content.Intent, /) -> None: ...
    @typing.overload
    def startAssistantActivity(self, intent: android.content.Intent, bundle: android.os.Bundle, /) -> None: ...
    def startVoiceActivity(self, intent: android.content.Intent, /) -> None: ...
    def unregisterVisibleActivityCallback(self, callback: VoiceInteractionSession.VisibleActivityCallback, /) -> None: ...

    class VisibleActivityCallback(java.lang.Object):
        def onInvisible(self, activityId: VoiceInteractionSession.ActivityId, /) -> None: ...
        def onVisible(self, activityInfo: VisibleActivityInfo, /) -> None: ...

    class Request(java.lang.Object):
        def cancel(self) -> None: ...
        def getCallingPackage(self) -> str: ...
        def getCallingUid(self) -> int: ...
        def getExtras(self) -> android.os.Bundle: ...
        def isActive(self) -> bool: ...
        def toString(self) -> str: ...

    class PickOptionRequest(VoiceInteractionSession.Request):
        def getOptions(self) -> java.chaquopy.JavaArray[android.app.VoiceInteractor.PickOptionRequest.Option]: ...
        def getPrompt(self) -> java.lang.CharSequence: ...
        def getVoicePrompt(self) -> android.app.VoiceInteractor.Prompt: ...
        def sendIntermediatePickOptionResult(self, selections: java.chaquopy.JavaArray[android.app.VoiceInteractor.PickOptionRequest.Option], result: android.os.Bundle, /) -> None: ...
        def sendPickOptionResult(self, selections: java.chaquopy.JavaArray[android.app.VoiceInteractor.PickOptionRequest.Option], result: android.os.Bundle, /) -> None: ...

    class Insets(java.lang.Object):
        TOUCHABLE_INSETS_CONTENT: typing.ClassVar[int] = ...
        TOUCHABLE_INSETS_FRAME: typing.ClassVar[int] = ...
        TOUCHABLE_INSETS_REGION: typing.ClassVar[int] = ...
        contentInsets: android.graphics.Rect = ...
        touchableInsets: int = ...
        touchableRegion: android.graphics.Region = ...
        def __init__(self) -> None: ...

    class ConfirmationRequest(VoiceInteractionSession.Request):
        def getPrompt(self) -> java.lang.CharSequence: ...
        def getVoicePrompt(self) -> android.app.VoiceInteractor.Prompt: ...
        def sendConfirmationResult(self, confirmed: bool | java.jboolean | java.lang.Boolean, result: android.os.Bundle, /) -> None: ...

    class CompleteVoiceRequest(VoiceInteractionSession.Request):
        def getMessage(self) -> java.lang.CharSequence: ...
        def getVoicePrompt(self) -> android.app.VoiceInteractor.Prompt: ...
        def sendCompleteResult(self, result: android.os.Bundle, /) -> None: ...

    class CommandRequest(VoiceInteractionSession.Request):
        def getCommand(self) -> str: ...
        def sendIntermediateResult(self, result: android.os.Bundle, /) -> None: ...
        def sendResult(self, result: android.os.Bundle, /) -> None: ...

    class AssistState(java.lang.Object):
        def getActivityId(self) -> VoiceInteractionSession.ActivityId: ...
        def getAssistContent(self) -> android.app.assist.AssistContent: ...
        def getAssistData(self) -> android.os.Bundle: ...
        def getAssistStructure(self) -> android.app.assist.AssistStructure: ...
        def getCount(self) -> int: ...
        def getIndex(self) -> int: ...
        def isFocused(self) -> bool: ...

    class ActivityId(java.lang.Object):
        def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def hashCode(self) -> int: ...

    class AbortVoiceRequest(VoiceInteractionSession.Request):
        def getMessage(self) -> java.lang.CharSequence: ...
        def getVoicePrompt(self) -> android.app.VoiceInteractor.Prompt: ...
        def sendAbortResult(self, result: android.os.Bundle, /) -> None: ...

class VoiceInteractionSessionService(android.app.Service):
    def __init__(self) -> None: ...
    def dump(self, fd: java.io.FileDescriptor, writer: java.io.PrintWriter, args: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onConfigurationChanged(self, newConfig: android.content.res.Configuration, /) -> None: ...
    def onCreate(self) -> None: ...
    def onLowMemory(self) -> None: ...
    def onNewSession(self, arg1: android.os.Bundle, /) -> VoiceInteractionSession: ...
    def onTrimMemory(self, level: int | java.jint | java.lang.Integer, /) -> None: ...
