import typing

import android.app
import android.content
import android.content.pm
import android.database
import android.graphics.drawable
import android.net
import android.os
import java
import java.chaquopy
import java.lang
import java.util

class Slice(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Slice]] = ...
    EXTRA_RANGE_VALUE: typing.ClassVar[str] = ...
    EXTRA_TOGGLE_STATE: typing.ClassVar[str] = ...
    HINT_ACTIONS: typing.ClassVar[str] = ...
    HINT_ERROR: typing.ClassVar[str] = ...
    HINT_HORIZONTAL: typing.ClassVar[str] = ...
    HINT_KEYWORDS: typing.ClassVar[str] = ...
    HINT_LARGE: typing.ClassVar[str] = ...
    HINT_LAST_UPDATED: typing.ClassVar[str] = ...
    HINT_LIST: typing.ClassVar[str] = ...
    HINT_LIST_ITEM: typing.ClassVar[str] = ...
    HINT_NO_TINT: typing.ClassVar[str] = ...
    HINT_PARTIAL: typing.ClassVar[str] = ...
    HINT_PERMISSION_REQUEST: typing.ClassVar[str] = ...
    HINT_SEE_MORE: typing.ClassVar[str] = ...
    HINT_SELECTED: typing.ClassVar[str] = ...
    HINT_SHORTCUT: typing.ClassVar[str] = ...
    HINT_SUMMARY: typing.ClassVar[str] = ...
    HINT_TITLE: typing.ClassVar[str] = ...
    HINT_TTL: typing.ClassVar[str] = ...
    SUBTYPE_COLOR: typing.ClassVar[str] = ...
    SUBTYPE_CONTENT_DESCRIPTION: typing.ClassVar[str] = ...
    SUBTYPE_LAYOUT_DIRECTION: typing.ClassVar[str] = ...
    SUBTYPE_MAX: typing.ClassVar[str] = ...
    SUBTYPE_MESSAGE: typing.ClassVar[str] = ...
    SUBTYPE_MILLIS: typing.ClassVar[str] = ...
    SUBTYPE_PRIORITY: typing.ClassVar[str] = ...
    SUBTYPE_RANGE: typing.ClassVar[str] = ...
    SUBTYPE_SOURCE: typing.ClassVar[str] = ...
    SUBTYPE_TOGGLE: typing.ClassVar[str] = ...
    SUBTYPE_VALUE: typing.ClassVar[str] = ...
    def __init__(self, in_: android.os.Parcel, /) -> None: ...
    def describeContents(self) -> int: ...
    def getHints(self) -> java.util.List[java.lang.String]: ...
    def getItems(self) -> java.util.List[SliceItem]: ...
    def getSpec(self) -> SliceSpec | None: ...
    def getUri(self) -> android.net.Uri: ...
    def isCallerNeeded(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, parent: Slice.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, uri: android.net.Uri, spec: SliceSpec, /) -> None: ...
        def addAction(self, action: android.app.PendingIntent, s: Slice, subType: str | java.lang.String, /) -> Slice.Builder: ...
        def addBundle(self, bundle: android.os.Bundle, subType: str | java.lang.String, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def addHints(self, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def addIcon(self, icon: android.graphics.drawable.Icon, subType: str | java.lang.String, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def addInt(self, value: int | java.jint | java.lang.Integer, subType: str | java.lang.String, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def addLong(self, value: int | java.jlong | java.lang.Long, subType: str | java.lang.String, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def addRemoteInput(self, remoteInput: android.app.RemoteInput, subType: str | java.lang.String, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def addSubSlice(self, slice: Slice, subType: str | java.lang.String, /) -> Slice.Builder: ...
        def addText(self, text: java.lang.CharSequence, subType: str | java.lang.String, hints: java.util.List[java.lang.String], /) -> Slice.Builder: ...
        def build(self) -> Slice: ...
        def setCallerNeeded(self, callerNeeded: bool | java.jboolean | java.lang.Boolean, /) -> Slice.Builder: ...

class SliceItem(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SliceItem]] = ...
    FORMAT_ACTION: typing.ClassVar[str] = ...
    FORMAT_BUNDLE: typing.ClassVar[str] = ...
    FORMAT_IMAGE: typing.ClassVar[str] = ...
    FORMAT_INT: typing.ClassVar[str] = ...
    FORMAT_LONG: typing.ClassVar[str] = ...
    FORMAT_REMOTE_INPUT: typing.ClassVar[str] = ...
    FORMAT_SLICE: typing.ClassVar[str] = ...
    FORMAT_TEXT: typing.ClassVar[str] = ...
    def describeContents(self) -> int: ...
    def getAction(self) -> android.app.PendingIntent: ...
    def getBundle(self) -> android.os.Bundle: ...
    def getFormat(self) -> str: ...
    def getHints(self) -> java.util.List[java.lang.String]: ...
    def getIcon(self) -> android.graphics.drawable.Icon: ...
    def getInt(self) -> int: ...
    def getLong(self) -> int: ...
    def getRemoteInput(self) -> android.app.RemoteInput: ...
    def getSlice(self) -> Slice: ...
    def getSubType(self) -> str: ...
    def getText(self) -> java.lang.CharSequence: ...
    def hasHint(self, hint: str | java.lang.String, /) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class SliceManager(java.lang.Object):
    CATEGORY_SLICE: typing.ClassVar[str] = ...
    SLICE_METADATA_KEY: typing.ClassVar[str] = ...
    @typing.overload
    def bindSlice(self, intent: android.content.Intent, supportedSpecs: java.util.Set[SliceSpec], /) -> Slice | None: ...
    @typing.overload
    def bindSlice(self, uri: android.net.Uri, supportedSpecs: java.util.Set[SliceSpec], /) -> Slice | None: ...
    def checkSlicePermission(self, uri: android.net.Uri, pid: int | java.jint | java.lang.Integer, uid: int | java.jint | java.lang.Integer, /) -> int: ...
    def getPinnedSlices(self) -> java.util.List[android.net.Uri]: ...
    def getPinnedSpecs(self, uri: android.net.Uri, /) -> java.util.Set[SliceSpec]: ...
    def getSliceDescendants(self, uri: android.net.Uri, /) -> java.util.Collection[android.net.Uri]: ...
    def grantSlicePermission(self, toPackage: str | java.lang.String, uri: android.net.Uri, /) -> None: ...
    def mapIntentToUri(self, intent: android.content.Intent, /) -> android.net.Uri | None: ...
    def pinSlice(self, uri: android.net.Uri, specs: java.util.Set[SliceSpec], /) -> None: ...
    def revokeSlicePermission(self, toPackage: str | java.lang.String, uri: android.net.Uri, /) -> None: ...
    def unpinSlice(self, uri: android.net.Uri, /) -> None: ...

class SliceMetrics(java.lang.Object):
    def __init__(self, context: android.content.Context, uri: android.net.Uri, /) -> None: ...
    def logHidden(self) -> None: ...
    def logTouch(self, actionType: int | java.jint | java.lang.Integer, subSlice: android.net.Uri, /) -> None: ...
    def logVisible(self) -> None: ...

class SliceProvider(android.content.ContentProvider):
    SLICE_TYPE: typing.ClassVar[str] = ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, *autoGrantPermissions: java.lang.String) -> None: ...
    def attachInfo(self, context: android.content.Context, info: android.content.pm.ProviderInfo, /) -> None: ...
    def call(self, method: str | java.lang.String, arg: str | java.lang.String, extras: android.os.Bundle, /) -> android.os.Bundle: ...
    def delete(self, uri: android.net.Uri, selection: str | java.lang.String, selectionArgs: java.chaquopy.JavaArray[java.lang.String], /) -> int: ...
    def getType(self, uri: android.net.Uri, /) -> str: ...
    def insert(self, uri: android.net.Uri, values: android.content.ContentValues, /) -> android.net.Uri: ...
    def onBindSlice(self, sliceUri: android.net.Uri, supportedSpecs: java.util.Set[SliceSpec], /) -> Slice: ...
    def onCreatePermissionRequest(self, sliceUri: android.net.Uri, /) -> android.app.PendingIntent: ...
    def onGetSliceDescendants(self, uri: android.net.Uri, /) -> java.util.Collection[android.net.Uri]: ...
    def onMapIntentToUri(self, intent: android.content.Intent, /) -> android.net.Uri: ...
    def onSlicePinned(self, sliceUri: android.net.Uri, /) -> None: ...
    def onSliceUnpinned(self, sliceUri: android.net.Uri, /) -> None: ...
    @typing.overload
    def query(self, uri: android.net.Uri, projection: java.chaquopy.JavaArray[java.lang.String], queryArgs: android.os.Bundle, cancellationSignal: android.os.CancellationSignal, /) -> android.database.Cursor: ...
    @typing.overload
    def query(self, uri: android.net.Uri, projection: java.chaquopy.JavaArray[java.lang.String], selection: str | java.lang.String, selectionArgs: java.chaquopy.JavaArray[java.lang.String], sortOrder: str | java.lang.String, /) -> android.database.Cursor: ...
    @typing.overload
    def query(self, uri: android.net.Uri, projection: java.chaquopy.JavaArray[java.lang.String], selection: str | java.lang.String, selectionArgs: java.chaquopy.JavaArray[java.lang.String], sortOrder: str | java.lang.String, cancellationSignal: android.os.CancellationSignal, /) -> android.database.Cursor: ...
    def update(self, uri: android.net.Uri, values: android.content.ContentValues, selection: str | java.lang.String, selectionArgs: java.chaquopy.JavaArray[java.lang.String], /) -> int: ...

class SliceSpec(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SliceSpec]] = ...
    def __init__(self, type: str | java.lang.String, revision: int | java.jint | java.lang.Integer, /) -> None: ...
    def canRender(self, candidate: SliceSpec, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getRevision(self) -> int: ...
    def getType(self) -> str: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...
