import typing

import android.app
import android.content
import android.media.browse
import android.media.session
import android.os
import java
import java.chaquopy
import java.io
import java.lang
import java.util

class CameraPrewarmService(android.app.Service):
    def __init__(self) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onCooldown(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onPrewarm(self) -> None: ...
    def onUnbind(self, intent: android.content.Intent, /) -> bool: ...


_MediaBrowserService__Result__T = typing.TypeVar('_MediaBrowserService__Result__T')  # <T>
class MediaBrowserService(android.app.Service):
    SERVICE_INTERFACE: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def dump(self, fd: java.io.FileDescriptor, writer: java.io.PrintWriter, args: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getBrowserRootHints(self) -> android.os.Bundle: ...
    def getCurrentBrowserInfo(self) -> android.media.session.MediaSessionManager.RemoteUserInfo: ...
    def getSessionToken(self) -> android.media.session.MediaSession.Token | None: ...
    @typing.overload
    def notifyChildrenChanged(self, parentId: str | java.lang.String, /) -> None: ...
    @typing.overload
    def notifyChildrenChanged(self, parentId: str | java.lang.String, options: android.os.Bundle, /) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onCreate(self) -> None: ...
    def onGetRoot(self, arg1: str | java.lang.String, arg2: int | java.jint | java.lang.Integer, arg3: android.os.Bundle, /) -> MediaBrowserService.BrowserRoot | None: ...
    @typing.overload
    def onLoadChildren(self, arg1: str | java.lang.String, arg2: MediaBrowserService.Result[java.util.List[android.media.browse.MediaBrowser.MediaItem]], /) -> None: ...
    @typing.overload
    def onLoadChildren(self, parentId: str | java.lang.String, result: MediaBrowserService.Result[java.util.List[android.media.browse.MediaBrowser.MediaItem]], options: android.os.Bundle, /) -> None: ...
    def onLoadItem(self, itemId: str | java.lang.String, result: MediaBrowserService.Result[android.media.browse.MediaBrowser.MediaItem], /) -> None: ...
    def setSessionToken(self, token: android.media.session.MediaSession.Token, /) -> None: ...
    class Result(java.lang.Object, typing.Generic[_MediaBrowserService__Result__T]):
        def detach(self) -> None: ...
        def sendResult(self, result: _MediaBrowserService__Result__T, /) -> None: ...

    class BrowserRoot(java.lang.Object):
        EXTRA_OFFLINE: typing.ClassVar[str] = ...
        EXTRA_RECENT: typing.ClassVar[str] = ...
        EXTRA_SUGGESTED: typing.ClassVar[str] = ...
        def __init__(self, rootId: str | java.lang.String, extras: android.os.Bundle, /) -> None: ...
        def getExtras(self) -> android.os.Bundle: ...
        def getRootId(self) -> str: ...
